
Starting MySQL... ERROR! ……quit without updating PID file (/opt/mysql/data/mysql.pid)解決方法
出現以下錯誤的原因有很多種,本次出現錯誤如下
1
2
3
4
5
6
7
Starting LSB: start and stop MySQL...
mysql[21548]: Starting MySQL.Logging to '/file/mysql/var/.err'.
mysql[21548]: The server quit without updating PID file (/file/mysql/var/.pid). ... failed!
systemd[1]: mysql.service: Control process exited, code=exited status=1
systemd[1]: Failed to start LSB: start and stop MySQL.
systemd[1]: mysql.service: Unit entered failed state.
systemd[1]: mysql.service: Failed with result 'exit-code'.
原因是修改了mysqld 存儲的目錄路徑,
記得要把原來var目錄下的所有文件復制到新的var目錄下。
做後就是權限一定要設置好,否則會出現上面的報錯。
1
2
chown -R mysql:mysql /usr/local/MySQL/data/
chmod -R 755 /usr/local/mysql/data
還有一種可能就是mysql進程已經啓動,結束進程重啓即可
1
2
用命令 ps -ef|grep mysqld 查看是否有mysqld进程,
如果有使用 kill -9 进程号杀死,然后重新启动mysqld!
做後刪除掉Mysql 的錯誤日志類似與mysql-bin.index或mysql-bin.000233這樣的。
💘 相关文章
- mysql error 1364 Field doesn't have a default values的解決方法
- php Parse error: syntax error, unexpected ';', expecting ',' or ')'的解决方法
- Tetua - an open source lightweight cms program based on golang and mysql, with installation and configuration
- mysql 8 修改用户名密码的命令
- Personal blog database selection, mysql vs sqlite?
- mysql严格模式引起1364 错误提示的處理過程的一些坑
- 轻量级的Php mysql web 管理客户端程序Adminer
- SSH Connecting to server X attempted a socket operation on an unreachable network. (os error 10051)
- PicGo配置兼容亚马逊s3的digitalocean space出現Error Stack Begin的解決方法
- 一款强大的开源国产图床系统,基于PHP,MySQL