Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

standalone mvupdate failed with "caching_sha2_password" not supported #136

Closed
umbertones opened this issue Nov 17, 2019 · 6 comments
Closed
Labels
done The issue was soled or implemented

Comments

@umbertones
Copy link

My mvupdate on my Linux server failed since November 12 (took some time to find out) .
Error Message was immediately after start "Database error: -1, Authentication plugin 'caching_sha2_password' is not supported"

Reason for failure was my upgrade from Ubuntu 19.04 to 19.10

Searching for the error message showed that some tools must have changed their default behavoiur concerning the authentication.

I then added in the storemysql.py the auth_plugin line to the database connection command as follows:
--- snip ---
self.logger.info( 'Using MySQL connector version {}', mysql.connector.version )
try:
self.conn = mysql.connector.connect(
host = self.settings.host,
port = self.settings.port,
user = self.settings.user,
password = self.settings.password,
auth_plugin = 'mysql_native_password'
)
try:
cursor = self.conn.cursor()
cursor.execute( 'SELECT VERSION()' )
--- snip ---

So far mvupdate is up and running again.

Unfortunately I'm not familiar with github, providing patches a.s.o., so any help would be greatly appreciated.

@codingPF
Copy link
Member

Ich habe versucht das auf einer VM zu testen (Ubunutu 19.10 / Kodi 18.6 / MySqlServer 8.0.19.
Ohne auth_plugin ging es problemlos,
Mit "auth_plugin" parameter bekomme eine Fehlermeldung.
Das scheint also erstmal nicht so einfach zu sein

@umbertones
Copy link
Author

The full error message would help
The Kodi version should not matter.
It works here since my post flawlessly with Ubuntu 19.10 and Mysql 8.0.19

@codingPF
Copy link
Member

I think i found the issue.
Looking at my log files shows that Kodi / MV used the mysql connector 1.1.7. This is the proper version accoring to addon.xml.
Looking at the mysql docs says that auth_plugin is only av. from 1.2 onwards ("Authentication plugin to use. Added in 1.2.1.").
https://dev.mysql.com/doc/connector-python/en/connector-python-connectargs.html

I guess your are using mvupdate as a standalone from installed phyton env. rather than Kodi?

@umbertones
Copy link
Author

umbertones commented Apr 19, 2020

Yes, you're right (see the title of this issue :-) ). I run mvupdate on a Linux Server and let Kodi on the raspberry connect to the database.
Thanks for resolving.

@codingPF
Copy link
Member

yes, took some time to think through it...
so there is not simple solution...it will work with Kodi or mvupdate.
In Kodi 19 (and update of the mysql connector plugin in Kodi) it will be fine.
But for Kodi 18 it can not work with both at the same time.
Unless you do something ugly about try....catch ... catch...

@codingPF codingPF added the done The issue was soled or implemented label Apr 29, 2020
@codingPF
Copy link
Member

Released to official Kodi Repo in v0.6.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done The issue was soled or implemented
Projects
None yet
Development

No branches or pull requests

2 participants