问题描述:服务器中使用service mysqld restart命重启MySQL失败。
报错信息如下:
Fatal error: Please read “Security” section of the manual to find out how to run mysqld as root
错误日志输出如下:
mysqld: File './binlog.index' not found (OS errno 13 - Permission denied)
解决方法:
1.根据日志提示查找到binlog.index文件;
2.binlog.index文件查找到后,使用记事本打开;
3.binlog.index文件打开后,将binlog.index拥有者设置成mysql;
chown mysql:mysql binlog.index
4.binlog.index拥有者设置好后,再次重启MySQL即可。
service mysqld restart
辰迅云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读: 怎样选择优质的香港服务器