Reputation: 107
I installed mysql
under Red Hat Linux 6.7 and when i try to run mysql
command it shows me this message:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
So i tried to find mysql.sock under /var/lib/mysql
and it is not there. Then i searched for the file from the root directory and again nothing. And it seems everything is configured to be working with that non existing file like /etc/my.cnf
in which the socket is configured to this directory. I'm sure mysql is installed cause when i run mysql --version
it shows:
mysql Ver 14.14 Distrib 5.1.73, for redhat-linux-gnu (x86_64) using readline 5.1
So what should i do to make it work?
Upvotes: 0
Views: 138
Reputation: 943510
I'm sure mysql is installed cause when i run mysql --version
That just tells you about the mysql command line client application.
It says nothing about the mysql server which you need to make sure is installed and running.
yum install mysql-server
/sbin/service mysqld start
Upvotes: 2