Fedora Linux Support Community & Resources Center
  #1  
Old 1st March 2006, 03:37 AM
jonhumphrey Offline
Registered User
 
Join Date: Jul 2005
Posts: 23
mysql can't find the correct socket

When I attempt to get mysql running I get the following:

[root@localhost ~]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

Any suggestions as to what I could do will be appreciated.
Reply With Quote
  #2  
Old 1st March 2006, 05:35 AM
DoorGunner Offline
Registered User
 
Join Date: Jan 2005
Age: 55
Posts: 91
I had this exact problem on fedora 3 and this is what i did to solve the problem for
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

When i was shutting the computer down i noticed that there was and error in removing the mysql.sock.....no permissions. I had monkeyed arround trying to find out what i need to give permissions too.....the i revisited my installation proceedure. I had origionally installed Fedora Core using Stanton-Finley notes. During the install it made a reference to turn off the protection for the httpd daemon. SO CLICK, the light bulb came on.

Uninstall mysql server and mysql-max
reinstall mysql server and mysql-max (gets rid of any errors that may have occurrd previous)

What you need to do is to go to terminal in root

/usr/sbin/setenforce 0
/etc/init.d/mysql start

This will force selinux off and start msql to get a mysql.sock started.

Go to Applications > System Settings > Security Level and type in your root pass word

Open the SELinux tab and under Modify SE linux policy
open SElinux service protection and click on Disable SELinux protection for mysqld daemon.

reboot your computer

Everything should work..... For some reason if the you dont disable the daemon the shut down proceedure WILL NOT be granted removal priveleges for the mysql.sock.......It will be there at start up and Mysql gets all confused at this and promptly shuts down........thats why i was getting the subject errors.....LOL

I hope this helps you or at least gives you some ideas of how to proceed with FC4.

Last edited by DoorGunner; 1st March 2006 at 05:38 AM.
Reply With Quote
  #3  
Old 1st March 2006, 06:23 PM
jonhumphrey Offline
Registered User
 
Join Date: Jul 2005
Posts: 23
"service mysqld restart" worked.
Thanks.
Reply With Quote
Reply

Tags
correct , mysql , socket

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot connect to mysql through socket.. Fault Using Fedora 3 19th April 2008 07:29 PM
MySQL Can't Connect Through Socket lardlad Servers & Networking 2 7th December 2007 01:54 PM
MySQL Can't Connect Through Socket lardlad Using Fedora 8 7th December 2007 01:57 AM
What's a socket and how do I find out why mine don't work PatMcLJr Using Fedora 0 1st August 2007 04:19 PM
running mySQL via socket StressedE Servers & Networking 1 15th August 2005 09:05 PM


Current GMT-time: 03:31 (Thursday, 19-10-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat