Kodi Not Working w/MySQL server (ERROR: Unable to open database: MyMusic60 [1049])
#1
Sad 
Hi guys...
 
I'm trying to install Kodi (17.6) from scratch and have it use a MySQL server installed and configured on a raspberry pi 3 running raspbian stretch, also from scratch.

I installed Raspbian and then installed the MySQL server using the instructions here. I then installed Kodi on a Windows 10 machine, ran it to create the userdata folder, then closed it and added the advancedsettings.xml file with the following text, where 192.168.1.200 is the static IP of the raspberry pi:

xml:
<advancedsettings>
  <videodatabase>
    <type>mysql</type>
    <host>192.168.1.200</host>
    <port>3306</port>
    <user>kodi</user>
    <pass>kodi</pass>
  </videodatabase>
  <musicdatabase>
    <type>mysql</type>
    <host>192.168.1.200</host>
    <port>3306</port>
    <user>kodi</user>
    <pass>kodi</pass>
  </musicdatabase>
  <videolibrary>
    <importwatchedstate>true</importwatchedstate>
    <importresumepoint>true</importresumepoint>
  </videolibrary>
</advancedsettings>

When I run Kodi again it just frreezes and then stops responding. In kodi.log I can see the following error: 'ERROR: Unable to open database: MyMusic60 [1049](Unknown database 'MyMusic60')'. In the MySQL server, running 'Show Databases;' shows the following databases:

MariaDB [(none)]> Show Databases;
+--------------------+
| Database           |
+--------------------+
| MyMusic60          |
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
4 rows in set (0.00 sec)


Can anyone please help me? Thanks in advance.


Complete kodi.log:

@Karellen- Log removed
Reply
#2
I have removed your log as we do not allow logs to be posted in the forum.

Please ensure you have enabled debugging in Settings>System Settings>Logging, restarted Kodi then replicated the problem.

Repost your log:
  1. Locate a Pastebin type site. Two examples are https://pastebin.com/ or https://paste.ubuntu.com/
  2. Paste the contents of the kodi.log file
  3. Press Paste or Generate or Create New Paste
  4. When the screen refreshes with your paste, copy the entire address in the address bar and paste it into a new message in your thread

Note: Full logs only. No partial or redacted logs
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
#3
I'm not a MySQL/MariaDB expert, but I would say try the simple step of deleting the MyMusic60 schema, and then running Kodi again with debug enabled to allow it to try to create the db. Depending on how that goes post a log as described above.
Reply
#4
Hello,

I had the same issue than initially reported in this post by another member. When using advancedsettings.xml in my userdata folder, Kodi takes a lot of time to start. As I couldn't find any solution, I decided to wipe out the existing video database (by using the reinitialize function in Mariadb on my NAS), in order to start all over again and see what happen.

So I launched Kodi in debug mode, hoping that it will create a new database.

In Kodi log I obtained the following messages:

Unable to open database: MyVideos107 [1049]
Unable to open database: MyVideos106 [1049]
...
Unable to open database: MyVideos75 [1049]

Once this (very long) process ended, Kodi finally managed to start and in Phpmyadmin I saw that a new database MyVideos107 has been created (blank but browsable). Since then, the error messages above do not show anymore in the log.

But Kodi startup and navigation are still extremely slow, only when using advancedsettings.xml. Kodi freezes for 5-10 secs every time I browse from one screen to another. If I remove the xml file, Kodi works flawlessly.

Here is my log:

https://pastebin.com/ssdcHjcj

I have the same problem regardless of the platform (Windows PC, Android devices).
Reply
#5
Code:
22:06:55.642 T:8920 INFO: MYSQL: Connected to version 5.5.5-10.0.34-MariaDB
22:06:55.658 T:8920 ERROR: Unable to open database: kodi_video107 [1049](Unknown database 'kodi_video107')
Seems like you set up your database server incorrectly, possibly with insufficient rights for the database user 'kodi'.

BTW, you don't need to use the <name> tag in the video database settings in the advancedsettings.xml file.
Kodi uses the default MyVideos prefix for that, and adds the version number to it.
Reply
#6
Thanks a lot for the quick response.

I made checks as per your comments.

User kodi has full privileges in phpmyadmin.

I updated my post and log, as it turned out that Kodi finally achieves to start after a long time. Once started, it's very slow. If I remove the advancedsettings file, it runs smoothly.

I cannot figure out why. Any idea?
Reply
#7
(2018-08-31, 23:37)shield.146810 Wrote: Once started, it's very slow. If I remove the advancedsettings file, it runs smoothly.
Doing that latter thing, Kodi will obviously run via the local database files only.

Running a MariaDB SQL database server on a Raspberry Pi will never win you any speed competitions. Most SD cards will have good read speeds, but lousy write speeds. I tried it on a Raspberry Pi 3B+ and Raspbian running off an external SSD via USB. The gigabit port helps a bit too. But it will never compare with a 'normal' PC having a SSD on proper SATA speed and with a proper gigabit connection.

Is your RPi database server connected via ethernet or wifi?

(2018-08-31, 23:37)shield.146810 Wrote: User kodi has full privileges in phpmyadmin.
23:25:40.651 T:5116 DEBUG: Mysql Start transaction
23:25:50.957 T:5116 DEBUG: Mysql commit transaction
No errors between those two lines should indicate that all SQL queries set for transcation must have been handled without errors, and you should now have a MyVideos107 database.
Reply
#8
I use multiple kodi clients: pc, galaxy tab, shield tv, all through gigabit ethernet, they all encounter the same issue. It used to work smoothly without the slow startup and slow browsing. I have no clue on what happened since but I can ensure there is something wrong.
Reply
#9
Just for the record: is there now a browseable MyVideos107 database on the SQL server?
Send in a new kodi.log file.

Perhaps there is a case of wear and tear ongoing on your RPi database SDcard, slowing things down.
Try a different sdcard and install Raspbian+MySQL/MariaDB on it.
You can also try to test the overall network speed with your RPi3 database device. How bad is it?
Reply
#10
Hello,

Sorry for late response, I had to perform some tests.

The db has been created by Kodi:
Quote:20:57:26.135 T:1864    INFO: MYSQL: Connected to version 5.5.5-10.0.34-MariaDB20:57:26.174 T:1864  NOTICE: Running database version MyVideos107
Here's the updated log: https://pastebin.com/ssdcHjcj

I do not use Raspberry, only Windows PC and Android devices, all facing the same issue while using advancedsettings file: it takes ages to start Kodi and to navigate in it. Kodi freezes. On the top left corner, MEM and CPU indications of the debug mode stop refreshing for 5 secs. Starting from line 600 in my log, you can see what happen when I go from one screen to another (File section of the video library). I noticed this message (not sure it has something to do with the issue):
Quote:ERROR: XFILE::CDirectory::GetDirectory - Error getting

What do you think?
Reply
#11
As my current issue is no longer consistent with the initial topic (error 1049 doesn't show up anymore), I suggest to post this issue in another thread. Thanks for the feedback received so far.
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi Not Working w/MySQL server (ERROR: Unable to open database: MyMusic60 [1049])0