LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 12-11-2008, 02:48 PM   #1
barbyb
LQ Newbie
 
Registered: Dec 2008
Distribution: RHEL 5
Posts: 1

Rep: Reputation: 0
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
 
Old 12-11-2008, 05:33 PM   #2
traene
Member
 
Registered: Jan 2005
Distribution: Archlinux, Debian, grml
Posts: 210

Rep: Reputation: 33
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
 
1 members found this post helpful.
Old 08-23-2011, 05:51 AM   #3
makundib
LQ Newbie
 
Registered: Jul 2009
Posts: 4

Rep: Reputation: 0
It works for me as well...
 
Old 08-23-2011, 05:59 AM   #4
makundib
LQ Newbie
 
Registered: Jul 2009
Posts: 4

Rep: Reputation: 0
.... of a big help...
 
  


Reply

Tags
error


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 03:13 PM
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysq mimique Linux - Software 23 08-14-2012 07:14 AM
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/my.. Goce Linux - Server 3 11-30-2008 10:57 PM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 02:52 AM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. SpellChainz Linux - Software 3 06-28-2007 12:46 PM


All times are GMT -5. The time now is 01:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration