#2002 - Can't connect to local MySQL server through socket '

Report any found bug here. We are grateful for any useful clues.

Moderator: severin

Post Reply
Posts: 1
Joined: Fri 11. Apr 2014, 01:47

#2002 - Can't connect to local MySQL server through socket '

Post by newtonentropy » Fri 11. Apr 2014, 02:23

"#2002 - Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2)
The server is not responding (or the local server's socket is not correctly configured)."

Hi -

I have been trouble shooting this error and another error that shows up when this one doesn't. The other error I get is "root@localhost does not have permission, using NO password." Not in those exact words.

I'm a new Drupal 7 developer and I have been having problems getting my projects from my job to work on my localhost. Apache has always worked fine and mysql used to start and I never used phpmyadmin on this computer so I don't know if mysql actually worked other than the green light that comes on that indicates it is working. But I made a mistake and accidentally deleted my initial MAMP settings and replaced them with the original settings. Ever since then I have never been able to get mysql to start properly. I have tried uninstalling and installing MAMP numerous times using different versions. I have looked on the internet for countless hours/weeks, trying some of the things from posts I found. For instance, directing mysql where to look for mysql.sock using: mkdir /var/mysql; ln -s /tmp/mysql.sock /var/mysql/mysql.sock. I have tried looking for mysql.sock using terminal command and nothing came up. I have tried changing ports. I made sure that in Drupal 7, settings.php had the correct DB credentials. I made sure my.cnf file was in Macintosh HD > Applications > MAMP > conf > my.cnf with the proper settings, the socket is set for the MAMP default. I tried changing the socket locations to match the redirect and nothing happens. MySQL just refuses to work properly.

This is the strange part in some cases when I uninstalled and reinstalled MAMP (during my many attempts in trying to correct this problem) sometimes I could connect to phpmyadmin via mysql and I was able to import the database, but then I would get the root@localhost, using no password error (which is for a different time and a different post). And when I tried to check phpmyadmin I was denied access and I saw that mysql had shut down. Sp that's weird... why would it let me in, import the database and then kick me off as soon as I tried to load my project? And I like I said have checked all the Drupal 7 config files and MAMP settings and they are identical to what I use at work. I do use windows at work, and my macbook pro at home, but that shouldn't be the issue.

Overall, I am just concerned in trying to get mysql working again. I know mac has it's own mysql instance, but I would like to use MAMP. Does anyone have any ideas? Thanks in advance!

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 4 guests