Solved Migrated MySQL from Win10 to Win 11, and now DB won't open.
#1
Hi folks,

This is related to Kodi DB's in a MySQL (MariaDB) implementation.

What changed:  I decided to upgrade my windows10 box (server) that I use as a NAS from Win10 to Win11.  Since my implementation was non-compliant (I used Rufus to get around the install limitations).  I had no choice but to do a complete fresh install of Win11.

The good news:  I kept a cloned SSD on Win10.  So, as I migrate, I can move back and forth between OS's  (with a change of cable & reboot).

What's the problem:  Kodi connects, but something is stopping my DB's on MariaDB from opening. 

The details:
I have a variety of DB's (ex:  mainmusic83, mainvid131, wintermusic83, wintervid131, etc) because I use profiles.   On Win10, running HeidiSQL, I exported the DB's using HeidiSQL's "Export database as SQL" function.  This creates an export of the data and makes an SQL script to allow for import.

After loading WIn11, MariaDB and HeidiSQL, I imported each of those SQL DB Scripts.   (And I did all the other expected tasks as stated in the WIKI, as well as ensuring drives were again shared, IP Address was correct, etc.).  So all my data appears to have migrated to my new MariaDB implementation. 

Going to one of my Kodi endpoints, I attempted to connect.  The ver21 splash screen came up, my profile choices came up, and when I selected the main profile none of the expected data was there.  

I could discuss more of the attempted troubleshooting, but instead I will post a copy of the log.  https://paste.kodi.tv/zohetoyote

Please feel free and provide me a suggestion on resolution, ask additional questions, or sneer derisively.

in the meantime, I have swapped drives and the NAS is back on Win10 (with functional DB's)

If the answer is blow away all the DB's and rescan after doing an export and then reimport, I'm ok with that...  but I would rather try to better understand the failure of the DB migration to resolve.  Thanks!


(ps:  NOT at all an expert on SQL, not a programmer, nor would I ever pretend to be.  It is quite possible that something was overlooked.)
Reply
#2
I'd start by double-checking that your SQL user (xbmc) actually has access privs to your databases.
From the log it looks like it doesn't, at least for the SQL split-up ones (MainVid and MainMusic, although it does seem to for the common ones like your addons33 db file).

The standard set-up commands are
  • Type in: CREATE USER 'kodi' IDENTIFIED BY 'kodi'; and press return
  • Type in: GRANT ALL ON *.* TO 'kodi'; and press return
  • Type in: flush privileges; and press return

In your case you'd need to swap out kodi for xbmc of course.
Maybe try the grant and flush again on your xbmc SQL user to confirm it has the privs that it should do.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#3
@DarenHill - Thanks so much!  This is why it's great to have someone else check the work.

I was too tired last night to catch my error, but you got it: "In your case you'd need to swap out kodi for xbmc of course."

I had copied the commands for kodi user rights for MySQL directly out of the wiki, forgetting that in advancedsettings.xml that I defined the user as xbmc.

So, no access because no rights.    >facepalmslap<    I will test and provide update after correction.

-----

Update - That did it!    Looks like HeidiSQL export and import works great to migrate SQL based KODI db's.
Reply
#4
Great news Smile
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply

Logout Mark Read Team Forum Stats Members Help
Migrated MySQL from Win10 to Win 11, and now DB won't open.0