Solved Android - Sql music Database does not update - after upgrade (V17-> V18)
#1
Hi,

I tried the new V18 version on Android (with Synology/My Sql-MariaDB ).
All works well only the music menu.
When i launch the music menu. Kodi failed

In the log, i've :
2019-04-13 12:07:53.977 T:6417  NOTICE: Old database found - updating from version 60 to 72
2019-04-13 12:07:53.985 T:6417   ERROR: SQL: Can't create database for copy: 'MyMusic60' (1007)
2019-04-13 12:07:53.989 T:6417   ERROR: Unable to copy old database MyMusic60 to new version MyMusic72

All passwords working well.

Any idea ?

Thanks a lot
Reply
#2
(2019-04-13, 14:48)Gilb-r Wrote: Any idea ?

With only 3 lines of the total debug log (wiki) file? Eh, nope. Smile
First guess: your database upgrade went wrong due to insufficient database user rights.

Enable debugging, and also enable the Database component in the debugging section. Then restart Kodi for a clean log.
Upload your log file to https://paste.kodi.tv/ and we may see what the culprit is.
Reply
#3
(2019-04-13, 16:01)Klojum Wrote:
(2019-04-13, 14:48)Gilb-r Wrote: Any idea ?

With only 3 lines of the total debug log (wiki) file? Eh, nope. Smile
First guess: your database upgrade went wrong due to insufficient database user rights.

Enable debugging, and also enable the Database component in the debugging section. Then restart Kodi for a clean log.
Upload your log file to https://paste.kodi.tv/ and we may see what the culprit is. 
Hi,
you are right, this the fully log : i upload le og in paste.kodi : do you see it
I think i've all the right on my account because it's works well videos database...
Reply
#4
(2019-04-15, 12:46)Gilb-r Wrote: i upload le og in paste.kodi : do you see it
No, we do not see it. You have to provide the link.

Copy the address in the address bar and post it into a post.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#5
(2019-04-15, 12:49)Karellen Wrote:
(2019-04-15, 12:46)Gilb-r Wrote: i upload le og in paste.kodi : do you see it
No, we do not see it. You have to provide the link.

Copy the address in the address bar and post it into a post. 
Here it is :
https://paste.kodi.tv/xakajadeko.kodi
Thanks
Reply
#6
Code:
2019-04-15 12:32:13.541 T:20567 NOTICE: MYSQL: Connected to version 10.3.7-MariaDB
2019-04-15 12:32:13.691 T:20567 ERROR: Can't update database MyMusic72 from version 0 - it's too old
2019-04-15 12:32:13.719 T:20567 ERROR: Unable to open database: MyMusic71 [1049](Unknown database 'MyMusic71')
2019-04-15 12:32:13.763 T:20567 ERROR: Unable to open database: MyMusic70 [1049](Unknown database 'MyMusic70')
...
2019-04-15 12:32:14.133 T:20567 NOTICE: Old database found - updating from version 60 to 72
2019-04-15 12:32:14.172 T:20567 ERROR: SQL: Can't create database for copy: 'MyMusic60' (1007)
2019-04-15 12:32:14.176 T:20567 ERROR: Unable to copy old database MyMusic60 to new version MyMusic72

It's clear enough as far as I can see. Try doing a mysqldump backup of the MyMusic60 database, have Kodi create a new music database, and restore the backup in it.
Reply
#7
(2019-04-15, 13:38)Klojum Wrote:
Code:
2019-04-15 12:32:13.541 T:20567 NOTICE: MYSQL: Connected to version 10.3.7-MariaDB
2019-04-15 12:32:13.691 T:20567 ERROR: Can't update database MyMusic72 from version 0 - it's too old
2019-04-15 12:32:13.719 T:20567 ERROR: Unable to open database: MyMusic71 [1049](Unknown database 'MyMusic71')
2019-04-15 12:32:13.763 T:20567 ERROR: Unable to open database: MyMusic70 [1049](Unknown database 'MyMusic70')
...
2019-04-15 12:32:14.133 T:20567 NOTICE: Old database found - updating from version 60 to 72
2019-04-15 12:32:14.172 T:20567 ERROR: SQL: Can't create database for copy: 'MyMusic60' (1007)
2019-04-15 12:32:14.176 T:20567 ERROR: Unable to copy old database MyMusic60 to new version MyMusic72

It's clear enough as far as I can see. Try doing a mysqldump backup of the MyMusic60 database, have Kodi create a new music database, and restore the backup in it.
Thanks, i will try your answer.
Reply
#8
2019-04-15 12:32:14.172 T:20567 ERROR: SQL: Can't create database for copy: 'MyMusic60' (1007)
Looking at it again... This is kind of weird. Perhaps your kodi database user does not have full privileges for creating a new database.

2019-04-15 12:32:13.691 T:20567 ERROR: Can't update database MyMusic72 from version 0 - it's too old
But then again, this is strange as well. Version 0 ?

Better update the SQL server first.
Reply
#9
(2019-04-15, 14:02)Gilb-r Wrote:
(2019-04-15, 13:38)Klojum Wrote:
Code:
2019-04-15 12:32:13.541 T:20567 NOTICE: MYSQL: Connected to version 10.3.7-MariaDB
2019-04-15 12:32:13.691 T:20567 ERROR: Can't update database MyMusic72 from version 0 - it's too old
2019-04-15 12:32:13.719 T:20567 ERROR: Unable to open database: MyMusic71 [1049](Unknown database 'MyMusic71')
2019-04-15 12:32:13.763 T:20567 ERROR: Unable to open database: MyMusic70 [1049](Unknown database 'MyMusic70')
...
2019-04-15 12:32:14.133 T:20567 NOTICE: Old database found - updating from version 60 to 72
2019-04-15 12:32:14.172 T:20567 ERROR: SQL: Can't create database for copy: 'MyMusic60' (1007)
2019-04-15 12:32:14.176 T:20567 ERROR: Unable to copy old database MyMusic60 to new version MyMusic72

It's clear enough as far as I can see. Try doing a mysqldump backup of the MyMusic60 database, have Kodi create a new music database, and restore the backup in it.
Thanks, i will try your answer. 
Hi,

i'm back i have finished to build my new house.
I tried your actions, no more sucess...
Do you have any idea ?
Thanks a lot.
Reply
#10
(2019-09-06, 22:24)Gilb-r Wrote: i'm back i have finished to build my new house.
After 5 months, it's probably a big house Smile

(2019-09-06, 22:24)Gilb-r Wrote: I tried your actions, no more sucess...
Do you have any idea ?
I'm not sure what the current state of your Kodi setup is.
From a database perspective, if you still have the v60 database:
  • You could try re-install a Kodi version that uses MyVideos60 as a database.
  • Do a full Video Library Export (separate files are preferred), with watch statuses and resume points.
  • Remove/rename the v60 video database
  • Install Kodi 18.4, reinstate your video and/or music source(s)
  • Import your media collection into Kodi 18.

If the v60 video database turns out corrupt for some reason, it's best to remove the v60 video database and start with fresh database and rescrape your media collection.
Reply
#11
(2019-09-06, 22:38)Klojum Wrote:
  • Do a full Video Library Export (separate files are preferred), with watch statuses and resume points.
Music library issue @Klojum, exporting music lib in v17 does not save song playback or rating data (v18 does) so that wil be lost. Export will only save the current additional artist and album data that may have been scraped from online sites.

Does sound like a db corruption. Use a SQL tool to take a copy of v60, it could be possible to salvage data if despirate, and then get it out the way or Kodi will keep trying to migrate it. But most of the music library data comes from scanning embedded metadata from the music files themselves, so starting again should not be too painful. Then re-scrape artist art and additional info (unless you have local art and nfo files for the additional data).

The loss will be song playback (count and last played) and user rating data that is dynamically changed during Kodi use. If really needed you can see what can be salvaged from the corrupted db.
Reply
#12
(2019-09-07, 00:02)DaveBlake Wrote: Music library issue @Klojum, exporting music lib in v17 does not save song playback or rating data (v18 does) so that wil be lost. Export will only save the current additional artist and album data that may have been scraped from online sites.

Well, it's either that or nothing.
Reply
#13
(2019-09-07, 00:06)Klojum Wrote:
(2019-09-07, 00:02)DaveBlake Wrote: Music library issue @Klojum, exporting music lib in v17 does not save song playback or rating data (v18 does) so that wil be lost. Export will only save the current additional artist and album data that may have been scraped from online sites.

Well, it's either that or nothing.

Hi everybody !
You're right :
It is a tiny house with no wheel lol Smile
Well, i updated the maria db software,
I deleted the 60 and 72 music databases in php myadmin
I open kodi and scrapped the music database
I turned it off.
I tried it : it work well now !!!!!!!!!!!!
Thanks you very much from France !!!!!!!!!!
Reply
#14
Thread marked solved.
Reply

Logout Mark Read Team Forum Stats Members Help
Android - Sql music Database does not update - after upgrade (V17-> V18)0