解决mysql.server start执行报错ERROR!The server quit without updating PID file
作者:衣有尘
mysql.server start执行报错
操作系统macOS
使用命令
mysql.server start
启动本机mysql时,提示
Starting MySQL
. ERROR! The server quit without updating PID file
查看mysql.local.err日志文件发现
2023-03-15T10:45:33.6NZ mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
mysqld: File './binlog.index' not found (OS errno 13 - Permission denied)
2023-03-15T10:45:33.703743Z 0 [System] [MY-010116] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.0.28) starting as process 49389
2023-03-15T10:45:33.724442Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive
2023-03-15T10:45:33.764881Z 0 [ERROR] [MY-010119] [Server] Aborting
2023-03-15T10:45:33.771402Z 0 [System] [MY-010910] [Server] /usr/local/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.28) MySQL Community Server - GPL.
注意
mysqld: File './binlog.index' not found (OS errno 13 - Permission denied)
这行报错
解决方案
百度了半天,在一个博主的文章中找到了解决方法,Permission denied权限拒绝很可能是文件没有权限导致的。
通过将/usr/local/mysql-8.0.28-macos11-x86_64/data(在mysql的安装目录下)文件夹权限设置为可读可写,并点击应用到项目,然后,mysql成功启动
mysql.server start Starting MySQL .. SUCCESS!
不过为什么出现这个问题还不知道,前几天mysql还能正常使用,突然发现连不上了。
总结
以上为个人经验,希望能给大家一个参考,也希望大家多多支持脚本之家。