Full Version: library sharing using mysql-server on XBian
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
XBian version: XBian 1.0 (knockout) (kernel: Linux 4.1.6+)
XBMC/Kodi version: Kodi 15.2-RC2 Git: 2015-09-22
Overclock settings: default

Device type: Raspberry Pi 2 Model 1GB RAM, CuBox-i i4Pro, ...):
Power supply rating: 2amp
SD card size and make/type: 8GB unbranded
Network (Ethernet or wireless): wired
Connected devices (TV, USB, network storage, ...):

Log files
Link to logfile(s):
Kodi Log

Problem description:
Hello All

I am really, really struggling with setting up mysql on my raspberry Pi using XBian. I have done this successfully several times before using the guide on the kodi wiki page and kodibuntu. It has normally worked without error. This time round I just cannot get the sql database to populate. On checking the kodi log I can see that kodi can't connect to the sql server. But I lack the knowledge to work out why or how to track the reason behind the error.

My advancedsettings.xml content is shown in the log on line 83 - 102
The error "ERROR: Unable to open database: MyMusic52 [2003](Can\'t connect to MySQL server on \'\' (111))" is on line 199

I have tried various things to resolve the problem:
1: tried different bind addresses in the .cnf file, tried and the server address of
4: I have installed phpmyadmin and can access the mysql data from there, the KodiUser appears to be setup correctly. I have tried changing the privileges of this user to 'all' but no change.

How to reproduce:
Install Xbian on an 8GB MicroSD card using XBian Installer on OSX 10.10.4
SSH in, then use XBian dashboard to apt-get update and apt-get upgrade all
Exit to shell and sudo apt-get install mysql-server
sudo service mysql stop
edit /etc/mysql/my.cnf and set bind address to
sudo service mysql start
mysql -u root -p
CREATE USER 'KodiUser' IDENTIFIED BY 'KodiPassword';
GRANT ALL ON *.* TO 'KodiUser';
flush privileges;
sudo shutdown -r now
once rebooted, add the music source to the library and try to scan source to the library
scanning will begin but the 'library mode' option stays grayed out. No music populates
Well just thought I'd put a note here to say that I found a solution to this problem with the help of the kodi forum. Please see the guidance below.

(29th Sep, 2015 04:09 PM)littlejeem Wrote: [ -> ]
(29th Sep, 2015 08:49 AM)menakite Wrote: [ -> ]Ah, wait, I remember a problem on XBian in case of a local MySQL server.

Can you try editing /etc/default/xbmc and change the line:


thanks menakite, I will try to when I get home tonight and report back.


Hello Menakite

I just wanted to let you know that I did:
nano /etc/default/xbmc

Couldn't save the code as got permission denied when saving changes so tried:
sudo nano /etc/default/xbmc
That worked so restarted the raspberry pi.

Tried rescanning the media source to the library and it bloomin worked first time!!

Thanks a bunch, will remember this tip

Reference URL's