I'm using Linux and I recently downgraded MySQL to 5.6 from 5.7 (due to some issues because of its strictness). Now when I use command mysql
, I get the error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
I have checked several posts and systemctl mysql start
seems to work. But everytime I reboot my system, I have to use systemctl mysql start
again to start MySQL.
Also, service start mysql
doesn't work.
There is no /etc/my.cnf file, only /etc/mysql/my.cnf file. I'm using Ubuntu 16.04.
How can I configure it so that the MySQL service starts at boot?
Edit: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) This post is unable to help either.