0

When I try to login to mysql through phpmyadmin I get the following errors:

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



Connection for controluser as defined in your configuration failed.

I run the following command and find that mysql is not using any port:

sudo netstat -tlpn | grep mysql

When I restart the mysql service and then check the port again it shows

tcp6       0      0 :::3306                 :::*                    LISTEN      3808/mysqld 

and there is no more error in phpmyadmin and I can continue working with mysql.

To work, I have to restart the mysql service everytime I start my system. Please help me with the error and tell me how to get rid of it.

This is my mysql version mysql Ver 14.14 Distrib 5.6.16 and this is my php version PHP Version 5.6.36-1.

0

1 Answer 1

1

If you want to ensure mysql is running on boot then here's how you'd enable it in via the startup service.

Ubuntu 16+

sudo systemctl enable mysql

Ubuntu 14

sudo update-rc.d mysql defaults

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you mate, that worked! :) But was this the cleanest solution possible? I thought there was some error with any of the configuration files.
Accepting this answer as this worked for me and there was no activity for a long time.. Thank you for the solution again..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.