ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysq
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
I know you've probably seen this error message a few hundred times but every "fix" I find or try doesn't seem to do the trick. I am running RHEL 5 and recently installed phpMyAdmin and continue to the get error 2002. I have: mysql-server-5.0.45-7.el5 mysql-5.0.45-7.el5 php-mysql-5.1.6-20.el5_2.1 I am unable to actually start the mysql service. It fails every time. mysqld_safe returns the following: [root@soundbusy init.d]# mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql STOPPING server from pid file /var/run/mysqld/mysqld.pid 081211 14:43:59 mysqld ended I have reinstalled php and mysql, recreated my database...I'm about to image this box and start all over but wanted one last attempt at getting this working before going through all the trouble. Please let me know what else I can provide or what else I can do to get this fixed. i get the error below in my mysql.log file: 081211 14:45:13 InnoDB: Started; log sequence number 0 43655 081211 14:45:13 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13) 081211 14:45:13 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13) 081211 14:45:13 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13) 081211 14:45:13 mysqld ended |
I took the following from:
http://dev.mysql.com/doc/refman/5.1/...ng-server.html [qoute] If your error log file has something like: Can't find file: './mysql/host.frm' (errno: 13) , and you've tried setting --datadir=/path/to/my/data/directory but you still get the same error, it may be because the databases installed in the mysql data directory (usually /var/lib/mysql) are not owned by the mysql daemon, but by the user who ran mysql_install_db. chown them to mysql and chgrp them to the appropriate group e.g. chown -R mysql /var/lib/mysql/mysql chgrp -R daemons /var/lib/mysql/mysql [/qoute] Best |
It works for me as well...
|
.... of a big help...
|
All times are GMT -5. The time now is 01:31 AM. |