Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

[root@localhost ~]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

[root@localhost ~]# systemctl start mysqld.service


[doctor@localhost ~]$ mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 5.5.38-MariaDB MariaDB Server


Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


MariaDB [(none)]> exit
Bye

你可能感兴趣的:(Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2))