I have checked status of mysql by sudo service mysql status and get the following output:
 mysql.service - LSB: Start and stop the mysql database server daemon
   Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled)
   Active: active (exited) since Fri 2016-07-22 15:06:35 IST; 11s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 4946 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS
Jul 22 15:06:35 ubuntu-lenovo systemd[1]: Starting LSB: Start and stop the mysql
Jul 22 15:06:35 ubuntu-lenovo systemd[1]: Started LSB: Start and stop the mysql 
But when I try it to run via terminal it says:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
When I try to run with host i.e. mysql --host 127.0.0.1 -uroot it says:
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
I have tried almost every solution from SO.
 
     
     
     
    