Kodi Community Forum

Full Version: Move MySQL Databases to new server
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So I've been it that for a couple hours now and I can't seem to get it to work at all.

First off this is what I have.
A windows pc running mysql and kodi 15.2. All the machines in my house currently look at this sql server for information.

I'm trying to move my databases to a docker on my new unraid server.

I'm not having any issues getting the myvideos93 database dumped and copied over, but for what ever reason every time I open up Kodi and point it at the new mysql i get the following

Code:
ERROR: Unable to open database: MyVideos93 [1049](Unknown database 'MyVideos93')

and Kodi will make new databases that are capitalized(MyVideos93 instead of myvideos93) and not use the ones I've copied over.

If I let Kodi create the databases and then try and populate them the dump from the original it doesn't work because the dump from the original server still makes a lowercase database.

Any thoughts would be greatly appreciated.
When I have done this in the past I always found it easier to export the library (using the option to separate file I think it's called) and then set up the new sql server and rescan it in - this should preserve all watched status and artwork.

Bit of a faff, but like you whatever I did Kodi would not use the copied db.
I'll give that a go. I'd still like to know if there is a solution to this or why it's happening.
(2016-01-11, 18:13)Prof Yaffle Wrote: [ -> ]Any use? http://forum.kodi.tv/showthread.php?tid=209208
This method works for me every time Smile
Open MySQL Workbench
Create the old server's connection (if you haven't it)
Create the new server's connection (if you haven't it)
Go to Server Administration and click Manage Import / Export
Select old server
Select all schemas in Export to Disk tab
In options select Export to Self-Contained File, wait until it finished
Back to Server Administration and click Manage Import / Export
Select new server
Switch to "Import from Disk"
Click "import from Self-contained File

http://stackoverflow.com/questions/12472...r-database

And don't forget to migrate your 'kodi user profile' from the old mySQL Db to the new one as well... or the Kodi profile in the advanced settings can't connect to the new server.
(2016-01-11, 18:13)Prof Yaffle Wrote: [ -> ]Any use? http://forum.kodi.tv/showthread.php?tid=209208

No this is the exact way I was trying to do it. Kodi just makes a new database on the sql server instead of using the one I restore from the old sql server.
(2016-01-14, 22:13)SKaterle Wrote: [ -> ]Open MySQL Workbench
Create the old server's connection (if you haven't it)
Create the new server's connection (if you haven't it)
Go to Server Administration and click Manage Import / Export
Select old server
Select all schemas in Export to Disk tab
In options select Export to Self-Contained File, wait until it finished
Back to Server Administration and click Manage Import / Export
Select new server
Switch to "Import from Disk"
Click "import from Self-contained File

http://stackoverflow.com/questions/12472...r-database

And don't forget to migrate your 'kodi user profile' from the old mySQL Db to the new one as well... or the Kodi profile in the advanced settings can't connect to the new server.

I wish I would have had a chance to try this as it seems to have more potential. I just ended up doing an video library export in kodi, moving my data to my new nas and point my new kodi to the new nas and doing a brand new library import. I couple things were off, but for the most part everything came through great.
(2016-01-14, 22:13)SKaterle Wrote: [ -> ]Open MySQL Workbench
Create the old server's connection (if you haven't it)
Create the new server's connection (if you haven't it)
Go to Server Administration and click Manage Import / Export
Select old server
Select all schemas in Export to Disk tab
In options select Export to Self-Contained File, wait until it finished
Back to Server Administration and click Manage Import / Export
Select new server
Switch to "Import from Disk"
Click "import from Self-contained File

http://stackoverflow.com/questions/12472...r-database

And don't forget to migrate your 'kodi user profile' from the old mySQL Db to the new one as well... or the Kodi profile in the advanced settings can't connect to the new server.


I signed up just to say thanks! I needed to move my MySQL Kodi DB to a VM and this worked a treat.