Shared MySQL Database Help
#1
I'm trying to set up a shared MySQL database. I did this easily once before on Snow Leopard. This is an attempt on Lion.

The XBMC log file is full of these:

Code:
18:45:02 T:2893275840   ERROR: Unable to open database xbmc_video
18:45:02 T:2893275840   ERROR: Unable to open database: xbmc_video [1045](Access denied for user 'xbmc'@'bleach' (using password: YES))

Here is a transcript of my attempt to create the MySQL database:

Code:
mysql> CREATE USER 'xbmc' IDENTIFIED BY 'xbmc';
Query OK, 0 rows affected (0.00 sec)

mysql> CREATE DATABASE xbmc_video CHARACTER SET latin1 COLLATE latin1_general_ci;
Query OK, 1 row affected (0.03 sec)

mysql> CREATE DATABASE xbmc_music CHARACTER SET latin1 COLLATE latin1_general_ci;
Query OK, 1 row affected (0.04 sec)

mysql> GRANT ALL ON *.* TO 'xbmc';
Query OK, 0 rows affected (0.00 sec)

mysql> select host,user from mysql.user;
+-----------+------+
| host      | user |
+-----------+------+
| %         | xbmc |
| 127.0.0.1 | root |
| ::1       | root |
| Bleach    |      |
| Bleach    | root |
| localhost |      |
| localhost | root |
+-----------+------+
7 rows in set (0.00 sec)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
| xbmc_music         |
| xbmc_video         |
+--------------------+
6 rows in set (0.07 sec)

Here's my advanced settings.xml file:

Code:
<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.168.0.75</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmc_video</name>
</videodatabase>

<musicdatabase>
<type>mysql</type>
<host>192.168.0.75</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmc_music</name>
</musicdatabase>
</advancedsettings>

(The exact same file worked fine when the machine was running SL.)

What have I done wrong here? I can't help but think I'm missing something.

This is on XBMC a75cce4. I should add that I did not install Lion over SL. I installed Lion on an external drive and migrated everything, except for a few users, onto the external drive.
Reply
#2
Code:
mysql> CREATE USER 'xbmc'@'bleach' IDENTIFIED BY 'xbmc';

should do it ... or you use 127.0.0.1 as mysql ip - one of both or both should work imho
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#3
Memphiz Wrote:
Code:
mysql> CREATE USER 'xbmc'@'bleach' IDENTIFIED BY 'xbmc';

should do it ... or you use 127.0.0.1 as mysql ip - one of both or both should work imho

Odd. The first time I tried that it failed. Rebooted, tried again and it worked.

Turns out you need two xbmc users; one with no named host the other as you wrote above.
Reply
#4
mhh ... on the second look you already had an user "xbmc" for the host % which means all hosts ... so my suggestion should have been superfluious...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#5
Somehow the host "%" doesn't work for localhost. I went back and dissected MySQL on Snow Leopard and see that I had to have two xbmc users: one with all hosts (%) and one with name of the localhost ("Bleach" in my case.)
Reply

Logout Mark Read Team Forum Stats Members Help
Shared MySQL Database Help0