当前位置: 动力学知识库 > 问答 > 编程问答 >

cannot connect to mysql server through socket 'var run mysqld mysqld.sock on Ubuntu (Emma)

问题描述:

I'M getting this Error

cannot connect to mysql server through socket 'var/run/mysqld/mysqld.sock'(2)

when I Click the mysql(Emma) localhost and I getting this error, and I googling it but no use,And also given below command I tried but getting Error only.

 $ps ax | grep mysql

4348 pts/5 S+ 0:00 grep --color=auto mysql

$sudo service mysql start

Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.

$sudo /etc/init.d/mysql start

[....] Starting mysql (via systemctl): mysql.serviceJob for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. failed!

What Should I do, can any one give me a suggestion

网友答案:

I get the Answer for above the question

    1.sudo apt-get remove --purge mysql-server-5.6
    2.sudo apt-get autoremove
    3.sudo apt-get autoclean
    4.sudo rm -rf /var/lib/mysql
    5.sudo rm -rf /etc/mysql
    6.sudo apt purge mysql-server mysql-server-5.7
    7.sudo apt install mysql-server-5.7
    8.service mysql start

Reference

It's working fine!

分享给朋友:
您可能感兴趣的文章:
随机阅读: