1

Hi I just downloaded mysql 5.7.13 for OS X 10.11, and I am having issue getting phpmyadmin to connect with it.

I was able to fully install mysql, turn on the mysql server and set the root password. I then went to set up phpmyadmin which i was able to do successfully but when i go to log into phpmyadmin using my root password I get this error message:

2002 - No such file or directory — The server is not responding (or the local server's socket is not correctly configured).

and also this error

mysqli_real_connect(): (HY000/2002): No such file or directory"

My laptop is acting as the server and client in this system by the way.

host = localhost

port = 3306

When I searched for my mysql.sock file I didn't find it but I found a file named mysql.sock.lock in /tmp Directory,why does mysql.sock.lock appear in /tmp and not mysql.sock, I believe that this is a big part of the issue but Im not sure how to fix it.

Also I saw that OS X looks for the mysql.sock file in var/mysql/ so i created an alias there for mysql.sock.lock, and restarted the server but this did nothing.

Any help with this error will be appreciated!

Thank you very much!

I apologize if this is worded weird Im pretty new to programming, Im just beginning to learn all these things.

Community
  • 1
  • 1
Dave Kin
  • 11
  • 4

1 Answers1

2

Don't worry about the mysql.sock.lock file. I fixated on it too, the mysql.sock file is hidden.

If you haven't already, create a mysql directory at /var by typing sudo mkdir /var/mysql

If you enter sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock it will find the hidden mysql.sock file.

I figured this out when I tried renaming the mysql.sock.lock file to mysql.sock and it gave me an error that the mysql.sock file already existed. I tried it and I can now connect from PHP to mySQL.