0

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

Community
  • 1
  • 1
Udayakumar
  • 307
  • 5
  • 14
  • The error message says: "See `systemctl status mysql.service` for details". What's the output if you run `systemctl status mysql.service`? – clinton3141 Sep 26 '16 at 09:58
  • yeah I use this command also **systemctl start mysql** , And the result is Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. @iblamefish – Udayakumar Sep 26 '16 at 10:14

1 Answers1

1

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!

Community
  • 1
  • 1
Udayakumar
  • 307
  • 5
  • 14
  • I got the following errormysqld: while installing 5.7 Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory) mysqld: [ERROR] Fatal error in defaults handling. Program aborted! Please take a look at https://wiki.debian.org/Teams/MySQL/FAQ for tips on fixing common upgrade issues. Once the problem is resolved, run apt-get --fix-broken install to retry. dpkg: error processing package mysql-server-5.7 (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: mysql-server-5.7 – vinsent paramanantham Jun 08 '18 at 13:55