/var/lib/mysql 的访问权限问题 Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)时间:2023-03-08 16:34:10 mysql 登录不进去 提示Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) shell> chown -R 777/var/lib/mysql 接着启动服务器 shell> /etc/init.d/mysql start 服务器正常启动后察看 /var/lib/mysql 自动生成mysql.sock文件 成功开启进入mysql