Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phpmyadmin - error 2002 - on Mac

I'm currently using Mac, and the running OS version is El Capitan. The web root is /Users/username/Sites.

I downloaded, extracted the phpmyadmin and moved the directory to the root folder, and I managed to get to the log in screen. But when I try to log in, it shows a message like this.

#2002 - No such file or directory<br />The server is not responding (or the local server's socket is not correctly configured).

I checked out if MySQL was turned off, but it was on so it doesn't have to do with that. Does anybody know how to solve out this matter?

like image 645
MarshallLee Avatar asked Jan 19 '16 17:01

MarshallLee


1 Answers

Got the same error after upgrading mariadb through homebrew upgrade on OS X Siera 10.12.5.

Turns out that a config directory was missing:

mysql: Can't read dir of '/usr/local/etc/my.cnf.d' (Errcode: 2 "No such file or directory")

Simply creating this directory solves the issue (no need to restart the mariadb daemon):

mkdir /usr/local/etc/my.cnf.d

Wait a few seconds and retry to connect:

$ mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 9
Server version: 10.2.6-MariaDB Homebrew
like image 163
jlapoutre Avatar answered Oct 05 '22 21:10

jlapoutre