View Full Version : Installing Slimserver in Ubuntu Feisty

2007-08-08, 15:05
I started by following the instructions on the Debian Package Wiki:
This happily installed Slimserver version 6.5.4
Mysql was also installed as a dependency and mysql --version gives:
mysql Ver 14.12 Distrib 5.0.38, for pc-linux-gnu (i486) using readline 5.2

If I go to http://localhost:9000 I get the slimserver web page - great. Looking at server settings shows me the following detailed version info:

SlimServer Version: 6.5.4 - 12506 - Debian - EN - utf8
Server IP address:
Perl Version: 5.8.8 i486-linux-gnu-thread-multi
MySQL Version: 5.0.38-Ubuntu_0ubuntu1

So - what's the problem?

Well, the server plays my music fine, however when trying to install AlienBBC I ran into problems and started looking at the log file. Before even installing AlienBBC I am getting errors like:
2007-08-08 14:41:29.0975 ERROR: DBI Connection failed: DBI connect('hostname=;port=9092;database=sli mserver','slimserver',...) failed: Can't connect to MySQL server on '' (111) at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 654

This is then followed by many other that result from the fact the slimserver can't connect to the database.
I therefore looked at the database. It seems that the version of mysql installed is the Ubuntu Feisty standard version with no modifications. /etc/mysql/ contains my.cnf and debian.cnf that are used to provide the starting parameters to the mysql server. However, after some poking around I then find that /var/cache/slimserver/ contains its own version of my.cnf. It seems like this is not getting read though, as I cannot connect to the mysql database using mysqladmin -uslimserver but I can connect with mysqladmin -uroot

If I copy /var/cache/slimserver/my.cnf to /etc/mysql/my.cnf or to /etc/mysql/debian.cnf the mysql server won't start. So my question is: how should I merge the slimserver mysql configuration files with the ones that are installed by Ubuntu? I am not using mysqld for anything else on this server. I am also thinking that if /var/cache/slimserver/my.cnf is not being read then perhaps the slimserver database and mysql user are never created either. I am surprised that no one else appears to have run into these problem given the number of Ubuntu users at the moment. Perhaps they are using the default Ubuntu (old) version available in the Ubuntu repositories. As an aside I did try that too, but couldn't get AlienBBC to work in that and so decided to go for the latest and greatest...but to no avail...

Anyway, any help/suggestions would be appreciated.

2007-08-08, 15:17
If you already have Mysql installed and running and don't want to start a private-slimserver-only version (which is fine: that will save you memory), then you need to tell Slimserver how to get to the existing instance.

See http://wiki.slimdevices.com/index.cgi?ExistingMySQLInstance for details.

2007-08-08, 15:24
Thanks very much for your reply. I am confused. The url you mention states that slimserver now comes bundled with it's own version of mysql (I assume that's what's meant by "includes its own embedded MySQL instance"). If this is true, why does slimserver depend on mysql? I am not running my own version of mysql. The only reason it is installed is because slimserver depends on it so 'apt-get install slimserver' also installs the mysql server. This server, however, seems to be the default Debian/Ubuntu configuration and is not as described in your link, which suggests that the mysql server should be slimserver specific by default.

2007-08-08, 16:06
I think the "includes Mysql" is more for Windows/Mac users than debian-and-friends users. Especially since it is much easier for Slim to just add "Depends: mysql-server" to the build and not have to deal with mysql itself.

The way it should work, I believe, is that it would grab mysql from the repository and invoke it by itself instead of letting the init scripts do it, effectively adding a "private" mysql instance.

If you aren't running mysql already, it should detect that and start it for you, listening on port 9092. That can break for several reasons though:

1) Something else had 9092 when it started so it couldn't get that port.
2) Mysql failed to start for some reason.
3) A firewall is blocking the port.

I don't know how the self-starting mysql should work: I think it logs into slimserver.log.

Does Ubuntu come with some stock firewall thing?

2007-08-08, 21:21
1) Something else had 9092 when it started so it couldn't get that port.
2) Mysql failed to start for some reason.
3) A firewall is blocking the port.
Does Ubuntu come with some stock firewall thing?

None of the above, and no, Ubuntu does not come with a firewall as by default no ports are open. Thanks for the explanation though. I'm sure I can get everything to work right with some effort. I was just surprised it didn't work out-of-the-box.

2007-11-03, 22:36
For the record, this is all I had to do:
mysql -uroot (-ppassword)
create database slimserver;
grant all on slimserver.* to slimserver identified by 'password';
flush privileges;

then edit /etc/slimserver/slimserver.conf
dbpassword: password
dbsource: dbi:mysql:database=slimserver;mysql_socket=/var/run/mysqld/mysqld.sock
dbusername: slimserver

Mark Miksis
2007-11-04, 09:00
You really shouldn't need to do any of this unless you want to. The deb package should work out-of-the-box as snarlydwarf described. Specifically, it will use it's own my.cnf and launch it's own instance of mysqld. The changes you made allow SS to use your already running mysqld instance which is fine, but shouldn't be necessary.