Hi all,
This one is getting the better of me!
Recently, I needed to replace the BSD jail running my Kodi MySQL database. So, backed up all databases with mysqldump, and once the new jail was created I restored the sql dump file. Created the user and pass, as best I could with (IMO) limited knowledge of mysql (enough to get by, though). Confirmed that I could connect and browse the db and tables from another computer on the local network, using the kodi user/pass. IP address has remained the same.
The problem is, both the Movies and TV library in Kodi have a single item in them, “1”. Double checked advancedsettings.xml and that’s all good - I recreated everything so that this file really didn’t need to be changed.
It’s my understanding that Kodi should just reconnect to the existing database, and resume without any real input. All the media paths have remained the same, and indeed work. Can play video’s without a problem.
Log file indicates at one point that it was unable to connect to the database, but then other lines (to me) show that it has connected to at least the Main_Video99 db - which is all I use really, don’t have a music source.
Here are some pastes of logs…
Kodi log from last night when I was trying to figure this one out, showing some errors in relation to the SQL connection;
19:59:09 34.888760 T:3023659792 NOTICE: Running database version Addons20 19:59:09 34.897522 T:3023659792 NOTICE: Running database version ViewModes6 19:59:09 34.908333 T:3023659792 NOTICE: Running database version Textures13 19:59:12 37.920975 T:3023659792 ERROR: Unable to open database: Main_Music56 [2003](Can't connect to MySQL server on '192.168.10.19' (113)) 19:59:15 40.921009 T:3023659792 ERROR: Unable to open database: Main_Music55 [2003](Can't connect to MySQL server on '192.168.10.19' (113)) 19:59:18 43.921043 T:3023659792 ERROR: Unable to open database: Main_Music54 [2003](Can't connect to MySQL server on '192.168.10.19' (113)) 19:59:21 46.921715 T:3023659792 ERROR: Unable to open database: Main_Music53 [2003](Can't connect to MySQL server on '192.168.10.19' (113)) 19:59:22 48.060944 T:3023659792 NOTICE: Old database found - updating from version 52 to 56 19:59:22 48.194241 T:3023659792 ERROR: SQL: Can't create database for copy: 'Main_Music52' (1007) 19:59:22 48.196358 T:3023659792 ERROR: Unable to copy old database Main_Music52 to new version Main_Music56 19:59:22 48.213264 T:3023659792 NOTICE: Running database version Main_Video99 19:59:23 48.526951 T:3023659792 NOTICE: Running database version TV29 19:59:23 48.539249 T:3023659792 NOTICE: Running database version Epg11 19:59:23 48.549706 T:3023659792 NOTICE: start dvd mediatype detection 19:59:25 50.886883 T:3023659792 WARNING: JSONRPC: Could not parse type "Setting.Details.SettingList" 19:59:27 53.158939 T:3023659792 NOTICE: ActiveAE DSP - starting 19:59:27 53.196033 T:3023659792 NOTICE: initialize done 19:59:27 53.196407 T:3023659792 NOTICE: Running the application... 19:59:27 53.261234 T:3023659792 NOTICE: starting zeroconf publishing 19:59:27 53.272526 T:3023659792 NOTICE: WebServer: Started the webserver 19:59:27 53.285820 T:3023659792 NOTICE: starting upnp client 19:59:28 53.357140 T:3023659792 NOTICE: starting upnp server 19:59:28 53.429028 T:3023659792 NOTICE: starting upnp renderer 19:59:28 53.566170 T:2644505584 NOTICE: ES: Starting UDP Event server on 0.0.0.0:9777 19:59:28 53.566708 T:2644505584 NOTICE: UDP: Listening on port 9777
Here’s my advancedsettings.xml file for reference;
<advancedsettings> <videodatabase> <name>Main_Video</name> <type>mysql</type> <host>192.168.10.19</host> <port>3306</port> <user>kodi</user> <pass>kodipass</pass> </videodatabase> <musicdatabase> <name>Main_Music</name> <type>mysql</type> <host>192.168.10.19</host> <port>3306</port> <user>kodi</user> <pass>kodipass</pass> </musicdatabase> <videolibrary> <importwatchedstate>true</importwatchedstate> <importresumepoint>true</importresumepoint> </videolibrary> </advancedsettings>
And, this morning I tested connecting to the mysql server from the RPi to double check that this device could in fact reach the database, connect with the user details in advancedsettings.xml, use a database and show tables;
osmc@osmc:~$ mysql -u kodi -pkodipass -h 192.168.10.19
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2870
Server version: 5.7.10 Source distribution
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 |
| Main_Music48 |
| Main_Music52 |
| Main_Music56 |
| Main_Video90 |
| Main_Video93 |
| Main_Video99 |
| MyMusic48 |
| MyVideos90 |
| mysql |
| performance_schema |
| sys |
| test |
+--------------------+
13 rows in set (0.00 sec)
mysql> use Main_Video99;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+------------------------+
| Tables_in_Main_Video99 |
+------------------------+
| actor |
| actor_link |
| art |
| bookmark |
| country |
| country_link |
| director_link |
| episode |
| episode_view |
| files |
| genre |
| genre_link |
| movie |
| movie_view |
| movielinktvshow |
| musicvideo |
| musicvideo_view |
| path |
| season_view |
| seasons |
| sets |
| settings |
| stacktimes |
| streamdetails |
| studio |
| studio_link |
| tag |
| tag_link |
| tvshow |
| tvshow_view |
| tvshowcounts |
| tvshowlinkpath |
| version |
| writer_link |
+------------------------+
34 rows in set (0.01 sec)
I am at a bit of a loss … the db, in my opinion, seems to be working, accepting connections, and allowing the kodi user access. I am not interpreting the logfile very well though…
I would really appreciate a bit of help troubleshooting this - my googling hasn’t come up with much help regards troubleshooting this.
Thanks in advance …