Access Denied phpMyadmin error 2002

Asked

Viewed 11,490 times

3

I’m needing to use phpmyadmin in the xampp, but this returning me this error

#2002 - File or directory not found The server is not responding (or the socket of the local server is not configured correctly). The connection for user control as defined in the settings, failed.

Could someone help me?

1 answer

6


Type of connection

Based on the details provided by the error, try accessing the file:

/phpmyadmin/config.inc.php 

And search the line:

$cfg['Servers'][$i]['connect_type'] = 'tcp';

Altering tcp for socket.


Path to mysql.Sock

Another issue with this error is that PHP cannot locate the Mysql socket file. Locate your file:

/etc/php/php.ini

And look for the line:

; Default socket name for local MySQL connects.  If empty, uses the built-in
; MySQL defaults.
; http://php.net/mysql.default-socket
mysql.default_socket = /caminho/para/mysql.sock

Where is /caminho/para/mysql.sock in the example string, puts the correct path to the file mysql.sock in your system.


Credits of the two solutions for @Semibz and @vaquerito respectively on archlinux in this topic.

  • so Zuul this soket file I don’t have it?? has how to create

  • @user3677610 runs on a terminal mysql_config --socket to see where the file is. It is created automatically when Mysql Deamon is started, it should be on your system unless it has been blocked by another process :/

  • Guy tested Aki and nothing

  • knows other ways??

  • @user3677610 Try on finish running: locate mysql.sock.

  • then ran the path of mysql.Sock, however it did not change anything I modified in php.ini, coonfig.inc.php, and in my.cnf, but the error is persisting

  • you have another idea??

  • @user3677610 Qd says "ran the path" you’re saying that he located the file and gave you the correct path to update the file php.ini, Right? And you also say that php.ini with the correct path and that after re-start keeps making the same mistake, right?

  • yes, making these processes all error remains

  • Zuul thanks for your attention but I managed to fix the error, I ended up changing the port of mysql thank you

  • 1

    @user3677610 Good news then! Take advantage and put your solution as a response and mark it as accepted. Will help future visitors with the same problem.

  • 1

    ok I simply opened the file my.cnf which is inside the lampp/etc and changed the ports 3306 to 3307 ready

  • Congratulations! @ Semibz and @vaquerito helped muuuito gave super sure change to php.ini thanks to God I got it! Thank you....

Show 8 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.