Kodi Community Forum

Full Version: (SOLVED) QNAP - mySQL - phpMyAdmin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ok I am having issues getting mySQL setup to work with KODI.

I am running a QNAP 870Pro with HD Station/XBMC 13.2

I have mysql turned on and using default port.

I have phpMyAdmin installed on Qnap to access mysql database.

Server Version 5.1.36
phpMyAdmin Version 4.1.13[/quote]

in phpMyAdmin I have ran the following code

PHP Code:
CREATE USER 'xbmc' IDENTIFIED BY 'xbmc';
GRANT ALL ON *.* TO 'xbmc'@'%' IDENTIFIED BY 'xbmc';
GRANT ALL ON *.* TO 'xbmc'@'%' IDENTIFIED BY 'xbmc'

then I have created the advancedsettings.xml and placed it into the correct folder

Code:
<advancedsettings>
    <videoscreen>
        <screen>0</screen>
    </videoscreen>
    

     <cputempcommand>sed -e 's/000$/ C/' /sys/class/hwmon/hwmon0/device/temp1_input</cputempcommand>
     <gputempcommand>sed -e 's/000$/ C/' /sys/class/hwmon/hwmon0/device/temp1_input</gputempcommand>


    <video>
        <playcountminimumpercent>101</playcountminimumpercent>
    </video>

    <videodatabase>
        <type>mysql</type>
        <host>192.168.0.53</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
    </videodatabase>

    <musicdatabase>
        <type>mysql</type>
        <host>192.168.0.53</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
    </musicdatabase>
</advancedsettings>

But when I run XBMC the databases are never created.

Looked at the logs and I get this:
Code:
08:54:37 T:4110825216   DEBUG: Initialize, updating databases...
08:54:37 T:4110825216  NOTICE: Running database version ViewModes6
08:54:37 T:4110825216  NOTICE: Running database version Textures13
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic46 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic45 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic44 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic43 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic42 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic41 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic40 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic39 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic38 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic37 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic36 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic35 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic34 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic33 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic32 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic31 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic30 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic29 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic28 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic27 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic26 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic25 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic24 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic23 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic22 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic21 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic20 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic19 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic18 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyMusic46 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to create new database
08:54:37 T:4110825216   ERROR: Unable to open database: MyVideos78 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyVideos77 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyVideos76 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyVideos75 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyVideos74 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyVideos73 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyVideos72 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyVideos71 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyVideos70 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyVideos69 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyVideos68 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyVideos67 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyVideos66 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyVideos65 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyVideos64 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyVideos63 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyVideos62 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyVideos61 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyVideos60 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to open database: MyVideos78 [1045](Access denied for user 'xbmc'@'QNAP870' (using password: YES))
08:54:37 T:4110825216   ERROR: Unable to create new database

I have checked and rechecked the permissions in phpMyAdmin and the xbmc user has all permissions.

I have re-initialized mySQL (reset) and reinstalled XBMC, so both were fresh. Still have same issue.

Note: I can connect to mysql using mysql workbench with the xbmc login and pass with not issues with full rights

Any thoughts?
Accessing from phpmyadmin, can you create a database? Try

Code:
CREATE DATABASE test;

from the sql tab
yes I can create a database logged in as xbmc user . I have even tried to create the databases MyVideos & MyMusic to try and help but still get the permissions issue
Is your bind-address setting set to allow IPs other than local host?
it is set to accept connections from any address, I can log in and connect to mysql from a different computer using mysql workbench using the xbmc login and create databases and whatever lease, but xbmc still gives the access denied issue
does anyone else out there have a QNAP with XBMC running on it with mysql working?
Still looking for help if anyone can help!
Wow. Ok I thought I would git it another go. I installed MYSQLBuddy on the qnap, then added then xbmc user, but instead of having the % as host and localhost, I also added 127.0.0.1 and QNAP870, and finally the actual internal IP of the xbmc media player which happened to be 10.8.0.1, once that was added val la now it created the databases as needed and all is working. Not sure which of the three made it work, but it does!

Hope this helps others should they have the same issue!
Just for posterity, this in general is not a QNAP issue, but a implementation / MySQL knowledge issue.

localhost on MySQL is not synonymous with the hostname (but it will attempt a socket connection) and as such MySQL it will NOT try to resolve it to 127.0.0.1

Just make sure that TCP/IP networking for MySQL is enabled and you use an IP address or hostname other than localhost that is resolvable on your subnet and things will work just fine.