mediathekview / plugin.video.mediathekview

Kodi plugin that gives access to most video-platforms from German public service broadcasters using the database of MediathekView.de
https://mediathekview.de/download/#mediathekview-f%C3%BCr-kodi-fr%C3%BCher-xbmc
MIT License
55 stars 25 forks source link

standalone mvupdate failed with "caching_sha2_password" not supported #136

Closed umbertones closed 4 years ago

umbertones commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

Released to official Kodi Repo in v0.6.4