Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ERROR 2002 (HY000): Can't connect to local MySQL server through socket

Status
Not open for further replies.

AcidReignX

Programmer
Feb 28, 2005
32
US
Hello,

I'm trying to run MySQL, and sadly I've not had a lot of success. I'm running on a brand new Macbook (Mac OS X 10.4 - Intel). I've downloaded both MySQL 4.1 and 5.0 in attempts to run them. Both have installed (using .dmg packages), but neither has actually managed to run.

I've been trying to troubleshoot the problem for hours now. Originally the error was:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

(( note the difference between "/tmp" and the current "/var/lib/mysql" ))

Basically, I've had lots of references to go ahead and change the my.cnf file in /etc (which at first didn't even exist... I had to copy that from somewhere else, too), as well as to search for the completely inexistent mysql.sock file that's supposedly on my drive (though I cannot seem to find it).

Furthermore, I don't even have a /var/lib directory on my computer, much less a /var/lib/mysql. I don't know if I've installed something improperly or what.

I don't know what other details to give. This is pretty much all I'm working with at the moment, scavenging for answers. Some direction would be greatly appreciated.

Thanks :)
~ Acid
 
Alright, I was able to fix the problem.

I went into /Library/Receipts

I removed the mysql packages with:
rm -R <mysql package>

I reinstalled mysql.

Worked fine after that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top