Upgrading from 20.5 to 21.0 - no more access to MySQL DB
#1
Hi, 
overall setup.
Maria DB 10 accessed from all kodi installations (PCs & Android TVs)
advancedsettings.xml extract
<advancedsettings>
    <videodatabase>
        <type>mysql</type>
        <host>192.168.0.**</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>***</pass>
                <name>myvideos_xbmc</name>
    </videodatabase>

    <musicdatabase>
        <type>mysql</type>
        <host>192.168.0.**</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>***</pass>
    </musicdatabase>

since yesterday kodi got upgraded to 21.0 within all my android TV box. DB Migration occured. Finding MyMusic83 & myvideos_xbmc131 within MariaDB
Since that automatic upgrade, none of the Android TV do succeed to start. They all stay stuck on the initial screen.

Then I decided to. Delete the new DBs then recreate them. No change on the Android TV box. All still stuck on initial screen

So I tried to upgrade one PC Windows 10 from 20.5 to 21.0.
* Delete the newly created MyMusic83 & myvideos_xbmc131
* Start install 21.0
* Then start kodi 21.0 on the PC. 
-> Very long start time
-> no more music nor videos
-> within MariaDB, no DB upgrade has occured !
Looking into the kodi.log of the PC, I find
2024-04-28 22:37:08.104 T:5604     info <general>: Running database version Addons33
2024-04-28 22:37:08.105 T:5604     info <general>: Running database version ViewModes6
2024-04-28 22:37:08.105 T:5604     info <general>: Running database version Textures13
2024-04-28 22:37:10.160 T:5604    error <general>: Unable to open database: MyMusic83 [2002](Can't connect to MySQL server on '192.168.0.6' (10061))
2024-04-28 22:37:11.584 T:15428    info <general>: CIRServerSuite:Tonguerocess: failed to connect to irss, will keep retrying every 5 seconds
2024-04-28 22:37:12.206 T:5604    error <general>: Unable to open database: MyMusic82 [2002](Can't connect to MySQL server on '192.168.0.6' (10061))
2024-04-28 22:37:14.241 T:5604    error <general>: Unable to open database: MyMusic81 [2002](Can't connect to MySQL server on '192.168.0.6' (10061))
...
and
2024-04-28 22:38:56.694 T:5604    error <general>: Unable to create new database
2024-04-28 22:38:58.747 T:5604    error <general>: Unable to open database: myvideos_xbmc131 [2002](Can't connect to MySQL server on '192.168.0.6' (10061))
2024-04-28 22:39:00.796 T:5604    error <general>: Unable to open database: myvideos_xbmc130 [2002](Can't connect to MySQL server on '192.168.0.6' (10061))
2024-04-28 22:39:02.849 T:5604    error <general>: Unable to open database: myvideos_xbmc129 [2002](Can't connect to MySQL server on '192.168.0.6' (10061))

Start a different PC still running with kodi 20.5, all is still fine. Old DBs MyMusic82 and myvideos_xbmc121 are still used as before. All works perfectly

On MariaDB nothing has changed and the user 'xbmc' still has same password and same authorization (full) since plenty releases
On the NAS nothing has changed too

Any idea of what could be the cause with Kodi Omega 21.0 ? 

Thanks a lot in advance.
Reply
#2
A debug log containing the database upgrade step is needed.

Given the symptoms (both MyMusic83 and MyVideos131 missing) it's likely you hit the "Can't determine list of routines to drop." problem.

As asked in other similar threads, please run the command mysql_upgrade on the server before you try the upgrade again and let us know the output.
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#3
Hi @CrystalP, there has been some evolution.
Over the night (prior your reply) I restarted the DB upgrade from the Android instances. I suspected a kind of timeout during migration. So I put a fake mouse dongle in the android box and run initial Kodi start which was supposed to migrate the DB. Apparently it went fine and all my android boxes now seems happy (video, music, tv...). From DB, I see the new DBs with similar size than the previous ones.

However, I just went to the PC with a smile on my face convinced all was solved. :-) Bad luck, it is still not capable anymore to log into the MySQL DB.

Since apparently only the Windows PC is in trouble I'm wondering which kind of log would you need? kodi.log or something else? I added the last log below

About the mysql_upgrade, is it still needed since the MyMusic83 and MyVideos131 do exists? Is it possible to run it after DB creation (from the android instance) ?

Since this PC (like the others) are not that used, I have a bit of time to solves this issue. So I can either follow your guidance to solves it and eventually that may help others too. Either, I switch to a fresh install and see if it restart to work
Up to you to suggest

Now digging only on that PC.
Just to see if there is a difference I changed in the advancedsettings the mysql port to a dummy wrong port. In that case, Kodi starts instantly BUT without any movies or music.
Switching back the correct port and restarting kodi. Kodi takes ages to start and in the kodi.log, I only see back what I shared yesterday
And just in case, I tried with firewall/connection... protection deactivated. No difference and anyway considering the above behavior frewall was not the issue.

Just to be clear, the advancedsettings.xml is the same for all instances (PCs, Android boxes). The Android boxes do run kodi 21.0. The PC in falure is with Kodi 21.0 while the other PCs still working are with Kodi 20.5

For time being, here is the current log file https://paste.kodi.tv/ragoruqiye.kodi
Thanks for your support in advance
Reply
#4
Running mysql_upgrade doesn't hurt and should be done after db engine version upgrades, but is unlikely to make a difference in this case.

The log contains errors like
 
Code:
debug <general>: dbiplus::MysqlDatabase::connect replacing configured host 192.168.0.6 with resolved host 192.168.0.6
error <general>: Unable to open database: MyMusic81 [2002](Can't connect to MySQL server on '192.168.0.6' (10061))

over and over. Code 10061 is low level Windows network error (connection refused), it doesn't look like the problem comes from Kodi (more accurately the mysql client library use by Kodi to connect).
You could try installing a db frontend on that computer to see if it has better luck connecting (heidisql, dbeaver,...)
Although the error would likely be different for missing permissions, it wouldn't hurt to double check the privileges granted to the kodi db user.
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply

Logout Mark Read Team Forum Stats Members Help
Upgrading from 20.5 to 21.0 - no more access to MySQL DB0