LinHES Forums
http://forum.linhes.org/

box sometimes stop booting with SQL error: Unable to connect
http://forum.linhes.org/viewtopic.php?f=6&t=14501
Page 1 of 1

Author:  kwbolte [ Thu Mar 08, 2007 4:38 am ]
Post subject:  box sometimes stop booting with SQL error: Unable to connect

Hi!

My Knoppmyth (R5E50) box stops very often booting with this errors:
Code:
2007-03-07 18:41:11.887: Driver error was: [1/2002]:
QMYSQL3: Unable to connect
Database error was:
Can't connect to local MySQl server through socket '/var/run/mysqld/mysqld.sock'  (2)

QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
2007-03-07 18:41:11.994: DB Error (KickDatabase):
Query was:
SELECT NULL;
No error type from QSqlError? Strange...

That happens always after waking ab with ACPIwakeup and sometimes after just switching it on.
My disks have plenty of space and mysqlcheck did not show any errors. My mysql.txt looks normal. The strange thing is that it's working sometimes ....

Author:  kwbolte [ Thu Mar 08, 2007 11:33 am ]
Post subject: 

I think I found the error myself - even if I don't understand.
I installed the locales before with apt-get install locales and then generated German locales with dpkg-reconfigure locales. In that menu I forget to activate all en_US-locales. So I reconfigured it now again, activated all en_US and de_DE locales and made en_US the default.
Well another thing I changed before was the mythtv-backend link in /etc/rcX.d from S50mythtv-backend to S99mythtv-backend to give mysql more time to come up.
The first boot was okay, so let's see.

Author:  kwbolte [ Sat Mar 10, 2007 2:24 pm ]
Post subject: 

Well, last posting was a little bit to early... the problem is still there ...

Can someone with installed R5E50 please post the output of
Code:
ls -l /etc/my*
to let me see if my rights are okay? The rights of /var/run/mysqld and its contens could be helpful, too.
Then I have three mysql.txt - in /etc/mythtv, /.mythtv and /home/mythtv/.mythtv with differnet contents. DBType=QMYSQL3 is missing in /etc/mythtv/mysql.txt. Is this normal?

Thanks,
Kai

Author:  bburtin [ Sun Mar 11, 2007 10:42 pm ]
Post subject: 

Don't know if we're having the same problem or not, but after a few days, suddenly my MySQL server isn't starting up automatically. Nothing in dmesg. Can anyone help me diagnose what's going wrong?

Kai, I posted the info you requested below.

Code:
root@mythtv2:/etc/init.d# dmesg | grep -i mysql
root@mythtv2:/etc/init.d#

root@mythtv2:/etc/init.d# ls -l /etc/my*
/etc/mysql:
total 16
-rwxr-xr-x 1 root root 1099 Nov 22 02:02 debian-start
-rw------- 1 root root  312 Oct 30 20:36 debian.cnf
-rw-r--r-- 1 root root 3996 Mar  5 21:21 my.cnf
-rw-r--r-- 1 root root 3996 Nov 28 19:17 my.cnf~

/etc/mythtv:
total 36
-rw-r--r-- 1 root   root      1 Mar  3 20:55 Cards
drwxr-xr-x 2 root   root   4096 Aug  6  2004 modules
-rw-rw---- 1 mythtv mythtv   76 Nov  4 19:04 mysql.txt
-rw-r--r-- 1 root   root   1894 Oct 17 06:42 mythweb-canned_searches.conf.php
-rw-r--r-- 1 root   root   4689 Oct 17 06:42 mythweb-config.php
-rw-r--r-- 1 root   root   6294 Nov  9 13:27 mythweb-htaccess
-rw-r--r-- 1 root   root     65 Dec 20 08:50 version
root@mythtv2:/etc/init.d# ls -l /var/run/mysqld/
total 0

Author:  bburtin [ Sun Mar 11, 2007 10:51 pm ]
Post subject: 

Never mind, I'm an idiot. I turned off the binlog in my.cnf. I thought it was unnecessary because I'm not using replication. This caused mysql startup to fail because the binlog expiration variable was set. Turned the binlog back on and things are peachy again. :oops:

Author:  kwbolte [ Tue Mar 13, 2007 9:17 am ]
Post subject: 

Thank you - my rights are ok. Anything about all the mysql.txt - files?

I think I'm stuck .... I normally need 2 .... 7 trys to get the machine booting without stopping with the above error. That's very frustrating.

Another problem is, that there is nowhere a complete bootlog, even if I set BOOTLOGD_ENABLE=yes in /etc/default/bootlogd ...

Author:  bburtin [ Wed Mar 14, 2007 3:22 pm ]
Post subject: 

The way I figured out my problem was by manually starting MySQL after it failed to start on boot. For some reason, it spat out the error when I started it manually, but the error never made it to dmesg during startup. I don't have access to the box right now, but I think it was something like
Code:
/etc/init.d/mysql start

Author:  kwbolte [ Thu Mar 15, 2007 3:11 am ]
Post subject: 

I tried that before several times - the error seems to come only during boot.
The question is: where does the bootlog go on knoppmyth? I know I've seen something like mysqld started during bootup when it works - but there is nothing like this in /var/log/dmesg...

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/