You are not logged in.
I just upgraded on my Linode and did a restart of both MySQL and Lighttpd. Both sites that run on the server now say they're either offline (Drupal) or that they encounter an error establishing a database connection (Wordpress).
I have been checking lighty's log, it doesn't show anything odd (no errors whatsoever). Syslog shows no MySQL-related messages, nor does dmesg (it just shows a PHP segfault but it is unclear when this has happened, since there is no timestamp, and the segfault does not seem to be reproduceable).
Could someone tell me where to look/how to debug? I've been sifting through topics on the BBS but nothing seems to be what I have...
[root@bellerophon php]# mysql_config --socket
/var/run/mysqld/mysqld.sock
Socket seems to be ok ^^.
I can log in manually to MySQL and the databases are there (the 'show databases' command lists all databases).
Since the upgrade meant a new PHP too (minor upgrade I think), I have diffed the php.ini.pacnew against the existing php.ini file, but there is nothing of substance. The mysql and mysqli extensions are enabled (seems Wordpress needs mysql.so).
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
Nvm, it appears to be a deeper problem .. PHP says it can't find a file/directory - this is the first time I see such mysql_error() message.
[Wed Feb 03 05:25:39 2010] [error] [client 127.0.0.1] PHP Warning: mysql_connect(): No such file or directory in /srv/http/index.php on line 3
Last edited by SemiBz (2010-02-03 03:36:52)
Offline
Just want to say I am also experiencing the same issue with lighttpd/mysql. Jinzora comes back and just says "could not connect to database", while there is nothing interesting in any of the logs, and I can also manually connect to mysqld and verify the existence of my databases.
Offline
Not that this will necessarily fix the problem, but mysql has been downgraded to 5.1.42-2, due to some problem with 5.1.43. If you sync your system with an up-to-date mirror, the downgrade will be forced.
Jay
Offline
Yes, I am running 5.1.42-2
Offline
You are right jt512. I picked a mirror that was more up to date, but rolling back to 5.1.42 does not seem to solve it. The problem remains, even after a restart.
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
Same issue here using latest MySQL, PHP, Apache.
Seems that PHP tried to use /tmp/mysql.sock which didn't exist.
My quick fix was to symlink /tmp/mysql.sock to /var/run/mysqld/mysqld.sock
Offline
You can edit /etc/php/php.ini, line ~1212 :
mysql.default_socket = /var/run/mysqld/mysqld.sock
Offline
I had a similar issue, although with apache. Rolling back php-apache from 5.3.1-4 to 5.3.1-3 solved it.
Is there a similar package for lighttpd?
Offline
You can edit /etc/php/php.ini, line ~1212 :
mysql.default_socket = /var/run/mysqld/mysqld.sock
This worked great for me. Thanks!
Offline
Thanks cdemoulins! That fixed it .
I find it a bit bizarre that now all of a sudden it's needed...
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
You can edit /etc/php/php.ini, line ~1212 :
mysql.default_socket = /var/run/mysqld/mysqld.sock
Thanks cdemoulins, this worked for me as well. Anyone know why this is necessary? What changed?
Offline
You can edit /etc/php/php.ini, line ~1212 :
mysql.default_socket = /var/run/mysqld/mysqld.sock
this didnt work for me. any other ideas?
Offline
cdemoulins wrote:You can edit /etc/php/php.ini, line ~1212 :
mysql.default_socket = /var/run/mysqld/mysqld.sock
this didnt work for me. any other ideas?
I just applied 6 months worth of updates - my server has been shutdown while moving - and my apache, mysql, php, libgd & drupal were all killed.
apache caused by router error and pacman removing my working config file
mysql - update installed default non-functional my.cnf in a diferent location (/etc/mysql/my.cnf instead of /etc/my.cnf) and deleted working /etc/my.cnf
php updated to 5.3.x which is not compatible with drupal 6.14 or 6.16 (php5.3 wont be supported til drupal 7) I lost config file while rolling back to php to v5.2.x
libgd still broken though configs seem to be right, been working on it all day.
drupal 6.16 update trashed setup files - reinstalled from scratch, seems to be working except for gd missing or wrong version.
other breakages, such as removable media and other things hal interfers with still to be looked into.
[UPDATE]
replacing rollbacked php with community/php52 solved php, libgd & drupal
Last edited by Cheifchimp (2010-04-28 03:36:00)
Offline