mySql can't work i did setup with whm :/

zinehost

Member
Jan 13, 2006
24
0
151
hi i bought a new server . I setup the whm everything is fine bu mysql is not running.
Server OS : CentOS, kernel 2.6.9-22.EL.

when i put "ps aux | grep mysql" i saw this process

root 17362 0.0 0.1 4920 1212 pts/0 S 06:21 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/tux.zinehost.com.pid
mysql 17381 0.1 1.0 30624 10620 pts/0 S 06:21 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/tux.zinehost.com.pid --skip-locking
mysql 17383 0.0 1.0 30624 10620 pts/0 S 06:21 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/tux.zinehost.com.pid --skip-locking
mysql 17384 0.0 1.0 30624 10620 pts/0 S 06:21 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/tux.zinehost.com.pid --skip-locking
mysql 17385 0.0 1.0 30624 10620 pts/0 S 06:21 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/tux.zinehost.com.pid --skip-locking
mysql 17386 0.0 1.0 30624 10620 pts/0 S 06:21 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/tux.zinehost.com.pid --skip-locking
mysql 17387 0.0 1.0 30624 10620 pts/0 S 06:21 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/tux.zinehost.com.pid --skip-locking
mysql 17388 0.0 1.0 30624 10620 pts/0 S 06:21 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/tux.zinehost.com.pid --skip-locking
mysql 17389 0.0 1.0 30624 10620 pts/0 S 06:21 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/tux.zinehost.com.pid --skip-locking
mysql 17390 0.0 1.0 30624 10620 pts/0 S 06:21 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/tux.zinehost.com.pid --skip-locking
mysql 17391 0.0 1.0 30624 10620 pts/0 S 06:21 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/tux.zinehost.com.pid --skip-locking
root 17393 0.0 0.0 4556 644 pts/0 R+ 06:22 0:00 grep mysql

and write a script with php trying to connect mySQL, there was an error ;

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)

what must i do ?
 

dkz

Well-Known Member
Sep 10, 2004
100
0
166
I had a server that gave me that error message. What I simply did was restarted mysql either by ssh entering /etc/init.d/mysql restart or in WHM. Sometimes one way worked and the other didn't. You can also try another reinstall by entering /scripts/mysqlup --force and recompile apache with the correct php modules. If you recomplie in whm, check Verbose Build and watch for any errors.