Can't connect to local MySQL server through /mysql.sock
How can I fix this prblem??
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) -Ganesh |
is the mysqld process running ? Check this first by typing :
Code:
ps aux | grep mysqld |
[root@enter3 root]# ps aux | grep mysqld
mysql 5220 0.0 0.2 12808 1496 ? S Jun08 0:00 /usr/sbin/mysqld mysql 5222 0.0 0.2 12808 1496 ? S Jun08 0:00 /usr/sbin/mysqld mysql 5223 0.0 0.2 12808 1496 ? S Jun08 0:00 /usr/sbin/mysqld root 9389 0.0 0.1 1732 596 pts/0 S 10:08 0:00 grep mysqld [root@enter3 root]# |
I changed the 'datadir' on file /etc/my.cnf file.
then I started it with 'mysqld_safe' Now its running on its own. I dont know what happend. - Ganesh |
Anyway who ever is having problem with mysql.sock
Make sure the mysql base directory and mysql data directory should have the proper permissions. - chown mysql.mysql <folder> Forget about the creation of mysql.sock on your own. On mysql startup it creates this file. So the error ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' is only because of permissions problem. -Ganesh |
Quote:
Ever hear of that saying, start with the easiest things first :D |
a lil late for this thread, but i ran into the same problem.
everything was running fine and the mysql error popped up. i mdified my my.cnf Code:
skip-innodb forgot where i found this :confused: |
create the mysql.sock with the following command
mysql -uroot -p -socket=/dbadmin/mysql/mysql01/run/mysql.sock
|
All times are GMT -5. The time now is 07:02 AM. |