Mysql Won't Start / No Process Running

splitech

Verified User
Joined
Sep 28, 2004
Messages
49
[root@monkey etc]# mysql -uroot
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@monkey etc]#


Help..

I did a killall mysqld / killall safemysqld

When i do /sbin/service mysqld start

nothing happends

Please Help ASAP!
 

fusionictnl

Verified User
Joined
Jun 22, 2004
Messages
1,053
Location
Netherlands
Normaly this error indicates that mysqld isn't running. So I would recommend to check the /var/log/messages and check if there are any errors when starting mysqld:

just run: mysqld

this will normaly show the error!
 
Last edited:

splitech

Verified User
Joined
Sep 28, 2004
Messages
49
MySQL Still wont Start!!!

mySQL works fine in last version.. version number 1.22.0 since i upgraded da to version 1.23.1 (crap) everything went to garbage, Now everytthing starts, and stops on its own, I still get this error when trying to start mysql:

[root@monkey customapache]# su mysql
bash-2.05b$ mysqld
041124 18:38:53 Can't start server: Bind on TCP/IP port: Address already in use
041124 18:38:53 Do you already have another mysqld server running on port: 3306 ?
041124 18:38:53 Aborting

041124 18:38:53 mysqld: Shutdown Complete

bash-2.05b$ exit
exit

I have tried killall -9 mysqld safe_mysqld

I even do look in /var/log/messages No error logs from mysql..
 

etegration

Verified User
Joined
Jan 22, 2004
Messages
139
Location
Singapore
Re: MySQL Still wont Start!!!

splitech said:
mySQL works fine in last version.. version number 1.22.0 since i upgraded da to version 1.23.1 (crap) everything went to garbage, Now everytthing starts, and stops on its own, I still get this error when trying to start mysql:

[root@monkey customapache]# su mysql
bash-2.05b$ mysqld
041124 18:38:53 Can't start server: Bind on TCP/IP port: Address already in use
041124 18:38:53 Do you already have another mysqld server running on port: 3306 ?
041124 18:38:53 Aborting

041124 18:38:53 mysqld: Shutdown Complete

bash-2.05b$ exit
exit

I have tried killall -9 mysqld safe_mysqld

I even do look in /var/log/messages No error logs from mysql..
do a:

ps -e | grep mysqld
Then kill the process ID.
 

splitech

Verified User
Joined
Sep 28, 2004
Messages
49
Same Issue

ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (

in DA under Mysql

But da shows the service is working and there are pids ??
 

lee

Verified User
Joined
Nov 2, 2003
Messages
12
Location
Netherlands
I have the same problem here.
Starting mysqld daemon with databases from /var/lib/mysql
Nothing is happening... :(
In DA panel it's say everything is running, but that is NOT.
I have php-mysql-4.2.2-17
 

fusionictnl

Verified User
Joined
Jun 22, 2004
Messages
1,053
Location
Netherlands
This could be due to change in the location of the mysql.sock (for example when updating mysql)

# updatedb
# locate mysql.sock


OR

find / | grep mysql.sock

This location should be the same as described in you're my.cnf of mysql (config file)

the mysql.sock is created when the deamon is started! If it doesn't exists than you're deamon isn't running ;)

If it says that the port is in use then there MUST be a process running on that port!

use netstat to find out if it is in use and an app is listening on that port.
 

lee

Verified User
Joined
Nov 2, 2003
Messages
12
Location
Netherlands
locate mysql.sock > it's here /var/lib/mysql/mysql.sock
====
This is my /etc/my.cnf

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
set-variable=max_connections=300
set-variable = wait_timeout=30

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

Still DA says Mysql is running, but now sites are working with Mysql.
 

lee

Verified User
Joined
Nov 2, 2003
Messages
12
Location
Netherlands
In /etc/my.cnf i had this:
socket=/var/lib/mysql/mysql.sock
But now i put this:
socket=/tmp/mysql.sock

All database websites are online again.

I hope DA Support check this out before we do a update.
Because with SSH i got this:
rpm -qa | grep mysql
php-mysql-4.2.2-17

But in /var/log/mysqld.log i see this:
Version: '4.0.16-standard' socket: '/tmp/mysql.sock' port: 3306

Hope i help some one out there.. :)
 

Icheb

Verified User
Joined
Sep 15, 2003
Messages
556
Location
The Netherlands
lee said:
I hope DA Support check this out before we do a update.
Because with SSH i got this:
rpm -qa | grep mysql
php-mysql-4.2.2-17

But in /var/log/mysqld.log i see this:
Version: '4.0.16-standard' socket: '/tmp/mysql.sock' port: 3306

Hope i help some one out there.. :)
Uhhm, correct me if wrong but, MySQL are separate rpm's from PHP normally.
PHP would have been installed from source with the custombuilder, while MySQL is an rpm.
Furthermore 4.0.16 is kinda outdated...

But as it's working now, I'll just hit the submit button and start working on my own stuff again :)
 
Top