Roberto García Roberto García - 20 days ago 6
MySQL Question

Can´t run Mysql or PhpMyAdmin on Linux Mint

I install PhpMyAdmin and when i try to run mysql but I always get the same error:

ERROR 2002 (HY000): CanĀ“t connect to local MySql server through socket 'var/run/mysqld/mysqld.sock' (2)


I unistall all packages include phpmyadmin, mysql, apache and purge them.

When i reinstall i have the same problem. Is the problem from mysql or from a bad configuration of PhpMyAdmin?
I have Linux Mint 18. Php version: 7.0.8, mysql version_ 5.7.16.

Thanks for your time.

Answer

What happens when you run:

service mysql status

in terminal?

Also when installing mysql are you installing mysql-server package?

EDIT: seems 2002 is lack of server, and only having mysql-client.

run sudo apt-get install mysql-server to fix this.