After installing XAMPP in CentOS ,I tried to open the phpmyadmin of XAMPP.
I opened the phpmyadmin URL in web browser and found the below given error.
MySQL said: Documentation
#2002 – No such file or directory
The server is not responding (or the local server’s socket is not correctly configured).
Later, I noticed that mysql service was not running.You can check the mysql status by running below given command.
netstat -tanp|grep mysql
To solve this error, run or restart the mysql service from XAMPP stack
Run the command to restart the mysql service from XAMPP
/opt/lampp/lampp stopmysql /opt/lampp/lampp startmysql
Open the XAMPP phpmyadmin URL in web browser
Open the web browser and type the XAMPP server phpmyadmin url.It should be working now
for eg. Replace 192.168.56.102 with your XAMPP system ip address.
Another troubleshooting step for XAMPP phpmyadmin error “# 2002 – No such file or directory”
I also found that in some cases XAMPP’s php.ini file, value for mysql.default_socket parameter is wrong. The system admin may give wrong path of mysql.sock path in mysql.default_socket parameter.
If we keep the parameter mysql.default_socket value blank,it will take default value.
Hence, for troubleshooting purpose,keep the mysql.default_socket value blank.
Below given is the reference from my system.
Here I have used grep command to show the particular paramater in php.ini file.
[root@localhost ~]# grep -w mysql.default_socket /opt/lampp/etc/php.ini mysql.default_socket= [root@localhost ~]#
it was working after running the above command but after i restart the laptop,
it was not working ! and when i try to type again the given command the problem still accour !
pleeease help me
sharad chhetri says
Run below given command
And need output of below command
Trung Nguyen says
It’s worked for me
Thank you so much !
sharad chhetri says
Thankyou Trung Nguyen,
I really appreciate your feedback and glad to know it works for you.