A big problem here was the MySql terminology. Under Unix/Linux, they use
"localhost" to refer to the Unix domain socket, not the IP address
127.0.0.1 (MySQL 5.1 Reference Manual, section 4.2.1). They further
confuse matters by suggesting you check that localhost is in
/etc/hosts.
If I connected to the database with:
sudo -H -u squeezecenter bash
mysql --socket=/var/lib/squeezecenter/cache/squeezecenter-mysql.sock
Then:
Code:
--------------------
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.45-Debian_1ubuntu3.3 Debian etch distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select host, user, password from user;
+-----------+------+----------+
| host | user | password |
+-----------+------+----------+
| localhost | root | |
+-----------+------+----------+
1 row in set (0.00 sec)
--------------------
This shows, I think, that no users (whether root or not) can connect
through 127.0.0.1; they can only connect through the Unix domain socket
("localhost"). Even though the daemon is listening on 127.0.0.1, it will
refuse connections. Note that /var/lib/squeezecenter/cache/my.cnf has
"skip-grant-tables", meaning there's no password checking.
So to fix the problem, first stop the SC daemon by issuing as root
"/etc/init.d/squeezecenter stop".
Then edit /var/lib/squeezecenter/prefs/server.prefs and change:
dbsource: dbi:mysql:hostname=127.0.0.1;port=9092;database=%s
to:
dbsource:
dbi:mysql:hostname=localhost;mysql_socket=/var/lib/squeezecenter/cache/squeezecenter-mysql.sock;database=%s
And then start squeezecenter with "/etc/init.d/squeezecenter start"
Unfortunately, that *still* doesn't fix it as the database hasn't
started. So start the database manually:
/usr/sbin/mysqld --defaults-file=/var/lib/squeezecenter/cache/my.cnf &
/var/log/squeezecenter/server.log then has:
Code:
--------------------
2008-05-05 17:40:30 SqueezeCenter died. Restarting.
[08-05-05 17:40:32.4418] Slim::Schema::init (151) Warning: Creating new
database - empty database or database from 6.3.x found
[08-05-05 17:40:33.7892] Slim::Utils::Misc::msg (1329) Warning:
[17:40:33.7887] Use of uninitialized value in numeric lt (<) at
/usr/share/perl5/Slim/Utils/PluginManager.pm line 102.
[08-05-05 17:40:33.9618] Slim::Utils::PluginManager::enablePlugins (374)
Couldn't load Slim::Plugin::PreventStandby::Plugin. Error: [-5]
[08-05-05 17:40:34.0689] Slim::Utils::Misc::msg (1329) Warning:
[17:40:34.0686] tempfile(): temporary filename requested but not opened.
Possibly unsafe, consider using tempfile() with OPEN set to true
[08-05-05 17:40:34.0735] Slim::Utils::Misc::msg (1329) Warning:
[17:40:34.0732] tempfile(): temporary filename requested but not opened.
Possibly unsafe, consider using tempfile() with OPEN set to true
[08-05-05 17:40:34.1523] main::checkDataSource (873) Warning: Schema updated
or no tracks in the database, initiating scan.
[08-05-05 17:40:34.1910] Slim::Networking::mDNS::startAdvertising (110)
Error: Couldn't find mDNSResponderPosix binary! Aborting!
--------------------
Perhaps a developer might want to look at these warnings.
I now get the setup assistant on http://localhost:9000.
--
Graeme Hewson
------------------------------------------------------------------------
Graeme Hewson's Profile: http://forums.slimdevices.com/member.php?userid=17138
View this thread: http://forums.slimdevices.com/showthread.php?t=46851
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/unix