LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   MySQL failing (https://www.linuxquestions.org/questions/linux-newbie-8/mysql-failing-648451/)

Zeno McDohl 06-10-2008 10:59 PM

MySQL failing
 
MySQL goes down once in a while. How can I determine the cause of this? I am unsure if there are logs, etc.

custangro 06-10-2008 11:13 PM

Look in /var/log/messages

What errors are you getting?

trickykid 06-10-2008 11:17 PM

/var/log/messages probably will tell you nothing. Check the mysql logs in /var/lib/mysql usually named after the hostname and ends with .err

Zeno McDohl 06-11-2008 12:19 AM

The latest .err file is from March. I had at least 2 times MySQL went down this month.

immortaltechnique 06-11-2008 12:32 AM

Kindly paste the contents of the above mentioned logs.

Zeno McDohl 06-11-2008 12:47 AM

Sure thing.

Dated 2008-03-09
Quote:

071221 00:07:01 mysqld started
071221 0:07:01 [ERROR] Can't start server : Bind on unix socket: Permission denied
071221 0:07:01 [ERROR] Do you already have another mysqld server running on socket: /opt/lampp/var/mysql/mysql.sock ?
071221 0:07:01 [ERROR] Aborting

071221 0:07:02 [Note] /usr/libexec/mysqld: Shutdown complete

071221 00:07:02 mysqld ended

071221 02:10:53 mysqld started
071221 2:10:55 [ERROR] Can't start server : Bind on unix socket: Permission denied
071221 2:10:55 [ERROR] Do you already have another mysqld server running on socket: /opt/lampp/var/mysql/mysql.sock ?
071221 2:10:55 [ERROR] Aborting

071221 2:10:55 [Note] /usr/libexec/mysqld: Shutdown complete

071221 02:10:55 mysqld ended

071230 14:24:49 mysqld started
071230 14:24:50 [ERROR] Can't start server : Bind on unix socket: Permission denied
071230 14:24:50 [ERROR] Do you already have another mysqld server running on socket: /opt/lampp/var/mysql/mysql.sock ?
071230 14:24:50 [ERROR] Aborting

071230 14:24:50 [Note] /usr/libexec/mysqld: Shutdown complete

071230 14:24:50 mysqld ended

080309 13:42:18 mysqld started
080309 13:42:20 [ERROR] Can't start server : Bind on unix socket: Permission denied
080309 13:42:20 [ERROR] Do you already have another mysqld server running on socket: /opt/lampp/var/mysql/mysql.sock ?
080309 13:42:20 [ERROR] Aborting

080309 13:42:20 [Note] /usr/libexec/mysqld: Shutdown complete

080309 13:42:20 mysqld ended

trickykid 06-11-2008 07:50 AM

Do you happen to have a /var/log/mysql.log? Sometimes that's a common place for mysql logs as well. And how was MySQL installed on this machine, what distro?

sir_com 06-11-2008 08:18 AM

Hi,

from the above log you have pasted....it seems that you have two instance of mysql installed on your machine. Please check the same.

When you connect to mysql server if from your local machine you are connecting (machine where server is installed)then it creates a linux domain socket to connect to server. So, if one instance is already using the socket to connect to server then the other instance will fail to connect. The sample log entry proves that...
-----------------
071230 14:24:50 mysqld ended

080309 13:42:18 mysqld started
080309 13:42:20 [ERROR] Can't start server : Bind on unix socket: Permission denied
080309 13:42:20 [ERROR] Do you already have another mysqld server running on socket: /opt/lampp/var/mysql/mysql.sock ?
080309 13:42:20 [ERROR] Aborting
----------------------

PLease provide the path where mysql is installed?

Thanks,
sir_com

chrism01 06-11-2008 08:48 PM

Actually its saying that he has one copy of the MySQL SERVER running and is trying to start another on the same machine. The client has nothing to do with it.

trickykid 06-11-2008 09:49 PM

Also if you read his reply, those logs he posted are from two months ago. The OP has stated that the MySQL server has crashed twice since the last log he's posted.

Zeno McDohl 06-11-2008 11:07 PM

Quote:

Originally Posted by trickykid (Post 3181514)
Do you happen to have a /var/log/mysql.log? Sometimes that's a common place for mysql logs as well. And how was MySQL installed on this machine, what distro?

No such mysql.log file. I am using Slackware, and MySQL came with XAMPP.


All times are GMT -5. The time now is 01:10 AM.