-1

I installed PhpMyAdmin and when I tried to run mysql 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 have tried to unistall all packages including 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.

Erudaki
  • 250
  • 3
  • 16
Roberto García
  • 115
  • 1
  • 11

1 Answers1

0

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.

  • Well, i did that and mysql doesnt give me error. But when i go to localhost/phpmyadmin i have a php code some strange. I didnt understand nothing now. – Roberto García Nov 17 '16 at 17:37
  • http://stackoverflow.com/questions/11657829/error-2002-hy000-cant-connect-to-local-mysql-server-through-socket-var-run –  Nov 17 '16 at 17:39
  • Well, its good to fix the error 2002 but i cant understand if phpmyadmin have a bug due php7. Thanks for all. EDIT: Reinstall PHP7 works for me. Missing library, you can see at: https://github.com/phpmyadmin/phpmyadmin/issues/12177 – Roberto García Nov 17 '16 at 17:42