1. 程式人生 > >centos7下Mariadb出現Can't connect to local MySQL server through socket 問題解決

centos7下Mariadb出現Can't connect to local MySQL server through socket 問題解決

檢視stockflow上,主要是因為mysql服務沒有啟動

 方法1:

首先執行 yum remove mysql

 然後安裝 yum install mariadb-server 

在啟動service mysql start即可

方法2:

# systemctl start mariadb.service

# systemctl enable mariadb.service# mysql

參考http://www.centoscn.com/CentosBug/softbug/2016/0115/6660.html