Skip navigation links

MySQL Forums :: Install & Repo :: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)


Advanced Search

One solution that worked (WITHOUT reinstalling everything)
Posted by: Meta Stable ()
Date: February 19, 2008 09:16AM

I had an earlier version of MySQL in another directory (as part of a lampp install that I had done earlier), and noticed that it had a mysql.sock file in the /opt/lampp/var/mysql directory.

I moved this file to my new/fresh installation directory (/var/lib/mysql). Didn't even have to restart the server - I just hit "mysql" on the command line, and I found that it now connected fine.

About time too... just as I was getting ready to reinstall everything..

Options: ReplyQuote


Subject Written By Posted
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Vacheh Sardarian 05/29/2005 01:34AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Ricardo Garcia Chavarry 10/08/2005 03:51PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) erick adienge 11/10/2005 12:07PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Paul KOENIG 11/19/2005 03:33AM
Unable to start mysqld Abhijit Mapgaonkar 03/03/2007 04:06AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Cristea Cristina 06/11/2008 03:32AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) John G 09/01/2008 06:23AM
Mac OS 10.5 Semi-Solution Jon Ohliger 01/08/2009 02:01PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Christine Pursley 11/15/2005 03:53PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Nastase Catalin 11/26/2005 05:11PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) ox 11/28/2005 09:43AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Ismael Ortiz Estrada 12/01/2005 08:09PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Chan Rays 12/03/2005 05:48PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Sohail Asif Khan 04/21/2006 11:41AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) gourav kumar 08/17/2006 04:52AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) rakesh krishna 05/16/2008 11:45PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) John G 08/31/2008 01:23PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Rajinesh Chintala 12/06/2005 11:57PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Rajinesh Chintala 12/07/2005 12:39AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Wan Ghazali Mohd Rasdi 01/31/2008 08:30PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Lynn Etheredge 09/24/2008 09:46AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Craig S 11/28/2005 07:29PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Marco Beijen 10/27/2009 11:46PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Craig S 11/28/2005 07:36PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Jason Belec 12/13/2005 02:44PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Jakub TCP 12/15/2005 09:07AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Bubba Jones 01/04/2006 02:55PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Jason Belec 01/04/2006 06:56PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Sohail Asif Khan 03/11/2006 03:30AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) cakra semar 04/11/2007 03:08AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) liam o'connor 04/20/2006 11:51PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Dennis Yu 07/17/2006 03:32AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Sohail Asif Khan 04/21/2006 11:40AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Jason 07/02/2006 02:01PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Terry James 07/20/2006 05:32AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Adam Klemke 02/04/2007 05:44AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) adil ismail 09/12/2007 01:01AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Rajeev Kumar 04/04/2007 06:41AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Cihan KIZILGUL 01/19/2007 12:08AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) SARA SPITONI 01/24/2007 10:19AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Bob Macpherson 02/01/2007 10:29PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Paul Lynch 02/09/2007 10:45AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Iain MacGranjthin 02/27/2007 04:47AM
WHY this ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) FRANCOIS LISSI 03/05/2007 12:23PM
SOLUTION: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Noel Hall 03/12/2007 08:58AM
Re: SOLUTION: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) reynie mahilum 09/03/2007 08:27PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) karthik santhanam 03/22/2007 10:44PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) mike 03/22/2007 11:23PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Jan Jaderný 03/23/2007 07:07AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Cam Blair 04/03/2007 10:49AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Mauricio Martinez 04/03/2007 04:35PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Walter Mendizabal 12/29/2007 10:09AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Walter Mendizabal 12/29/2007 10:07AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) iSLAMKENT iSLAMi SiTE iSLAMi SOHBET 04/04/2007 12:56AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) trstn 04/04/2007 07:47AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) rakesh krishna 05/16/2008 11:48PM
Solution for: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Ibrahim Assaab 06/07/2008 02:00AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) tianxing yi 09/14/2008 01:31AM
Re: ERROR 2002 (HY000): Solution ! Howard Hebbler 04/14/2007 01:24PM
Re: ERROR 2002 (HY000): Mac OS X 10.5.1 & MAMP Levon Spradlin 01/23/2008 05:16PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Thinakaran Chelliah 07/17/2007 03:39AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Neel basu 09/06/2007 08:26AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Adam Bragg 09/08/2007 08:44AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Neel basu 09/11/2007 12:18AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) abzim le kabyle 12/14/2007 04:03PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Walter Mendizabal 12/29/2007 10:03AM
One solution that worked (WITHOUT reinstalling everything) Meta Stable 02/19/2008 09:16AM
Re: One solution that worked (WITHOUT reinstalling everything) Aditya Darbha 03/03/2008 04:45AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Misael Jabines 04/11/2008 08:16PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Aimin Huang 09/01/2008 08:00PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Ro Nin 02/09/2009 05:05AM
SOLUTION TO THE PROBLEM Manuel Sosa 04/15/2009 11:56AM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) art martin 06/14/2009 12:52PM
Possible solution to the issue: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Umesh Shastry 07/28/2009 02:27AM
Solution koteswara Rao muntha 10/21/2009 06:18PM
Re: (EVEN SIMPLER) Solution (for mac os x) Faddah Steve Yuetsu Wolf 10/31/2009 12:46PM
Re: (EVEN SIMPLER) Solution (for mac os x) Faddah Steve Yuetsu Wolf 10/31/2009 12:46PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.