You are not logged in.

#1 2010-02-02 23:56:39

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

[Solved] MySQL 5.1.43 upgrade: Lighttpd not picking up MySQL

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

#2 2010-02-03 01:10:05

SemiBz
Member
From: Riga, Latvia
Registered: 2010-01-30
Posts: 80

Re: [Solved] MySQL 5.1.43 upgrade: Lighttpd not picking up MySQL

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

#3 2010-02-03 03:49:59

piroko
Member
Registered: 2010-01-28
Posts: 14

Re: [Solved] MySQL 5.1.43 upgrade: Lighttpd not picking up MySQL

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

#4 2010-02-03 05:01:27

jt512
Member
Registered: 2009-02-19
Posts: 262

Re: [Solved] MySQL 5.1.43 upgrade: Lighttpd not picking up MySQL

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

#5 2010-02-03 05:02:25

piroko
Member
Registered: 2010-01-28
Posts: 14

Re: [Solved] MySQL 5.1.43 upgrade: Lighttpd not picking up MySQL

Yes, I am running 5.1.42-2 smile

Offline

#6 2010-02-03 07:03:24

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [Solved] MySQL 5.1.43 upgrade: Lighttpd not picking up MySQL

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

#7 2010-02-03 08:11:06

rostved
Member
From: Denmark
Registered: 2009-09-17
Posts: 3
Website

Re: [Solved] MySQL 5.1.43 upgrade: Lighttpd not picking up MySQL

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

#8 2010-02-03 09:30:19

cdemoulins
Member
From: Paris
Registered: 2008-04-06
Posts: 7

Re: [Solved] MySQL 5.1.43 upgrade: Lighttpd not picking up MySQL

You can edit /etc/php/php.ini, line ~1212 :

mysql.default_socket = /var/run/mysqld/mysqld.sock

Offline

#9 2010-02-03 09:41:17

fastfret79
Member
Registered: 2009-09-05
Posts: 87

Re: [Solved] MySQL 5.1.43 upgrade: Lighttpd not picking up MySQL

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

#10 2010-02-03 13:34:45

piroko
Member
Registered: 2010-01-28
Posts: 14

Re: [Solved] MySQL 5.1.43 upgrade: Lighttpd not picking up MySQL

cdemoulins wrote:

You can edit /etc/php/php.ini, line ~1212 :

mysql.default_socket = /var/run/mysqld/mysqld.sock

This worked great for me. Thanks!

Offline

#11 2010-02-03 18:00:19

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [Solved] MySQL 5.1.43 upgrade: Lighttpd not picking up MySQL

Thanks cdemoulins! That fixed it smile.

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

#12 2010-02-05 06:39:03

Neb
Member
Registered: 2009-04-29
Posts: 13

Re: [Solved] MySQL 5.1.43 upgrade: Lighttpd not picking up MySQL

cdemoulins wrote:

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

#13 2010-02-06 22:05:48

delacruz
Member
From: /home/houston
Registered: 2007-12-09
Posts: 102

Re: [Solved] MySQL 5.1.43 upgrade: Lighttpd not picking up MySQL

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?

Offline

#14 2010-04-27 12:55:29

Cheifchimp
Member
From: Queensland Australia
Registered: 2009-05-07
Posts: 69

Re: [Solved] MySQL 5.1.43 upgrade: Lighttpd not picking up MySQL

delacruz wrote:
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

Board footer

Powered by FluxBB