sudo service mysql start
mysql启动异常
root@Ubuntu:~# sudo service mysql startJob for mysql.service failed because the control process exited with error code. See \\\"systemctl status mysql.service\\\" and \\\"journalctl -xe\\\" for details.
sudo systemctl status mysql.service
查看mysql服务启动状态
Unable to setup unix socket lock file.
ubuntu查看日志文件命令:
tail -n 200 /var/log/mysql/error.log
查看日志文件 /var/log/mysql/error.log
,提示错误信息
Could not create unix socket lock file /var/run/mysqld/mysqld.sock.lock.
mysql –version
查询当前数据库版本
mysql Ver 14.14 Distrib 5.7.22, for Linux (x86_64) using EditLine wrapper
/var/run/mysqld/
重新赋予目录权限
sudo chown -R mysql:mysql /var/run/mysqld/
原创文章,作者:网络技术联盟站,如若转载,请注明出处:https://www.sudun.com/ask/49899.html