Rob van My digital life


XBMC MySQL doesnt work after upgrade to Synology DSM 5.0

Yesterday I've upgraded my Synology DS 410 to DSM 5.0 BETA. After the upgrade all packages are working but when I started my HTPC XMBC was unable to connect to the MySQL library on my DS. It turns out that MySQL is replaced by MariaDB. All databases and users are available in MariaDB and I can access them with phpMyAdmin, but not remote from XBMC.

Update: The issue is resolved in an updated package of MariaDB (version 5.5.33.a-0013). Changelog;

Whats new in version 5.5.33.a-0013:

  1. Fixed an issue where MariaDB cannot start.
  2. Now binds to all network IP addresses in addition to localhost.

I've resolved this problem by making a configuration change within the MariaDB package, the default config doesn't allow remote access. Take the following steps to alter the configuration;

  1. First make sure you can access your DiskStation with SSH, you can verify and optional enable this in the controlpanel within DSM. Open the Control Panel en navigate to Terminal & SNMP. Check the option Enable SSH services and click Apply.
  2. Now connect to your DS with a SSH client (I use Putty,
  3. Login with the username root and for the password you must use the same password as in the DSM webinterface for the user admin
  4. Now we need to edit the my.cnf MariaDB configuration file, this file is located in /volume1/@appstore/MariaDB/etc/mysql/
    1. Open the configuration file in vi;

      vi /volume1/@appstore/MariaDB/etc/mysql/my.cnf

    2. In the mysqld section of the configuration file there is an entry bind-address = we need to comment this line to disable this.
    3. Now place an #-sign before the line;
       If you don't know vi: press the INS[SERT] key, use arrows to go to the line to edit, and delete/edit the line. Then press the ESC key, and type 😡 to 'Save & Exit'.
      altered mycfg
  5. Now the MariaDB service need to be restarted so the new configuration becomes active. I'm not sure how to do this manually so the easy way is to restart your DiskStation (or stop and start the MariaDB package from the Package Center).

After the restart of the MariaDB package (or you DiskStation) XBMC will be able again to access the MySQL shared library

Comments (12) Trackbacks (2)
  1. Save a reboot:
    /usr/share/mysql/mysql.server restart

  2. Wanneer ik de regel in Putty zet krijg ik niet het bestand wat ik aan moet passen, maar alleen de volgende regel.
    /volume1/@appstore/MariaDB/etc/ 1/1 100%

    Iemand een idee wat ik niet goed doe?
    En als het kan in Jip en Janneke taal, want in dit opzicht zijn wij best wel digibeet.

    Hartelijke bedankt.

  3. I upgraded to the latest Synology DSM and had issues every since. I’ve since cleaned the databases, remade the xbmc user in phpMyAdmin, recreated advancedsettings.xml in openelec,… even though I’m able to play every file on my NAS, it just won’t create a library out of it. I keep getting errors in the openelec log too: “(…) 22:44:43 T:140347842197312 ERROR: Unable to open database: MyMusic32 [1042](Can’t get hostname for your address)
    22:44:43 T:140347842197312 ERROR: Unable to create new database”. What can I do?

  4. Houd dit in dat ik deze handleiding ( eerst moet uitvoeren en daarna bovenstaande erna moet doen. Of houdt dit in dat mogelijk een nieuwe handleiding komt als je vanaf nu met een juist aangekochte Syno dit alsnog wil gaan opzetten in DSM 5.0?

  5. Hi Rob,

    Wat bedoel je met ‘MySQL is replaced by MariaDB’? Door wie? In de beta van Syno (?) of in XBMC?

  6. The file is readonly – I stopped phpmyadmin und MariaDB, but i can’t save the cnf file. Any ideas?

  7. Bedankt Rob , werkt weer perfect.

  8. Dooh! Don’t try this at 1:00 AM! Forgot to stop and start MariaDB. Did that, rebooted XBMC and all libraries back…yay.

  9. Had some issues with ‘vi’ on mine and needed the Synology specific keys to get it to work i to enter insert mode, add the #, escape to exit edit/insert mode the ‘:wq’ to save and exit.

    However, don’t now what I did but when I sparked up Openelec (3.2.4) that has been great for months, no Movie, TV or Music libraries and XBMC will not scan at all. Hmmmm…..

  10. Thanks Rob. I was about to upgrade to the Beta last night but noticed the removal of MySQL so deferred. Will try your steps later today.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.