Open Jasmine-liang opened 3 years ago
MySQL :: MySQL 5.6 Reference Manual :: B.3.2.2 Can't connect to [local] MySQL server I know there are two ways of connecting the mysqld server in Unix, So I quckly found that the/tmp/mysql.sock was missing.
/tmp/mysql.sock
資料庫中mysql.sock不存在問題,Can 't connect to local MySQL server through socket '/tmp/mysql.sock '(2) " - IT閱讀 Then use systemctl start mysqld.service to start the server. Use systemctl status mysqld.service to check the status of the server.
systemctl start mysqld.service
systemctl status mysqld.service
Solution: ln -s /var/lib/mysql/mysql.sock /run/mysqld/mysqld.sock Start MySql:
ln -s /var/lib/mysql/mysql.sock /run/mysqld/mysqld.sock
systemctl start mysqld.service mysql -u root -p
Check the MYSQL Reference Manual
MySQL :: MySQL 5.6 Reference Manual :: B.3.2.2 Can't connect to [local] MySQL server I know there are two ways of connecting the mysqld server in Unix, So I quckly found that the
/tmp/mysql.sock
was missing.Solution
資料庫中mysql.sock不存在問題,Can 't connect to local MySQL server through socket '/tmp/mysql.sock '(2) " - IT閱讀 Then use
systemctl start mysqld.service
to start the server.Use
systemctl status mysqld.service
to check the status of the server.