Access Denied phpMyadmin error 2002

Posted on

Question :

I need to use phpmyadmin in xampp, but this is returning me this error


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

Could anyone help me?


Answer :

Connection type

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


And look for the line:

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

Changing tcp to socket .

Location of mysql.sock

Another issue with this error is that PHP can not locate the MySQL socket file. Locate your file:


And look for the line:

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

Where /caminho/para/mysql.sock is in the sample text, put the correct path to the mysql.sock file on your system.

Credits of the two solutions for @SemiBz and @query respectively in archlinux in this topic .


Leave a Reply

Your email address will not be published. Required fields are marked *