Phpmyadmin - Error 2002 - on Mac

I am currently using a Mac, and a working version of the OS is El Capitan. Network root /Users/username/Sites .

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

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

I checked if MySQL was disabled, but it was turned on, so it has nothing to do with it. Does anyone know how to resolve this issue?

+7
php mysql phpmyadmin macos
source share
2 answers

So the solution was pretty simple for my case.

After reading some articles such as this , I looked through the phpmyadmin directory to find the config.inc.php file. This is something that I still do not understand, but there was no file with the same name.

Instead, the file with the closest name was config.sample.inc.php , so I changed its file name and changed $cfg['Servers'][$i]['host'] = 'localhost'; on $cfg['Servers'][$i]['host'] = '127.0.0.1'; . Now I can log in with my phpmyadmin account.

+21
source share

I got the same error after updating mariadb via homebrew upgrade on OS X Siera 10.12.5.

It turns out that the config directory is missing:

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

Just creating this directory solves the problem (there is no need to restart the mariadb daemon):

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

Wait a few seconds and try connecting again:

 $ 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 
0
source share

All Articles