v16 [Solved/Howto] Failed mysql upgrade
#1
Not sure what happened here, but I'll share it in case it's useful to someone else.

With the release of the OpenElec Jarvis beta, I finally took the plunge today and upgrade my main (xubuntu 14.04/mysql) Kodi installation.

apt-get dist-upgrade, start Kodi... splashscreen... nothing. Start again, splashscreen, nothing. Repeat until bored.

Dipping into advancedsettings.xml to switch debug logging on, check the log file:

Code:
16:29:28 T:139668191242240  NOTICE: Running database version MyMusic56
16:29:28 T:139668191242240   ERROR: SQL: [MyVideos99] The table does not exist

... so I concluded that there's something wrong with the underlying tables, and Kodi is simply shooting itself as a result. How to force a db upgrade, though?

Drop to mysql:

Code:
$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 41
Server version: 5.5.47-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| MyMusic46          |
| MyMusic48          |
| MyMusic52          |
| MyMusic56          |
| MyVideos78         |
| MyVideos90         |
| MyVideos93         |
| MyVideos99         |
| mysql              |
| performance_schema |
+--------------------+
11 rows in set (0.04 sec)

... so the databases are there (MyMusic56 and MyVideos99 for Jarvis, plus you can see some relics of earlier versions - Database_versions (wiki)), but obviously not working - table corruption? Well, I've got the Isengard databases, and I took a database backup (mysqldump, as per my own post here) before I tried upgrading (you'd all do that... right?) - so, let's just drop them and try again:

Code:
mysql> drop database MyVideos99;
Query OK, 22 rows affected (1.16 sec)

mysql> drop database MyMusic56;
Query OK, 20 rows affected (0.72 sec)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| MyMusic46          |
| MyMusic48          |
| MyMusic52          |
| MyVideos78         |
| MyVideos90         |
| MyVideos93         |
| mysql              |
| performance_schema |
+--------------------+
9 rows in set (0.00 sec)

Re-start Jarvis, and tail -f on kodi.log shows the database upgrade... and all is now good.

No idea what happened, but just in case it's useful. Now, off to break the OE boxes Smile
Reply

Logout Mark Read Team Forum Stats Members Help
[Solved/Howto] Failed mysql upgrade0