New centos dedicated server - cant get mysql working

Hi all,

I installed centos 5, with LAMP.
httpd is working fine, ssh, ftp all working ok.

But, when I try to use mysql its not,

when I give the command

mysql

I get

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

Is mysql running?

service mysqld status

ps fax | grep mysqld
1 Like

Hi, thanks for the reply..
this is the respons

[root@test /]$  mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib        h socket '/var/lib/mysql/mysql.sock' (2)service mysqld statusSQL server through
-bash: syntax error near unexpected token `('
[root@test /]$  service mysqld status
mysqld is stopped
[root@test /]$  ps fax | grep mysqld
 5636 pts/1    S+     0:00          \_ grep mysqld
[root@test /]$  service mysqld start
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL:                                            [FAILED]
[root@test /]$

yum remove mysql* -y
rm -rf /var/lib/mysql

yum install mysql* -y

service mysqld restart

mysql -u root -p
password

there you go

1 Like

fantastic!

Thank you so much!