问题描述:
mysql数据库通过 service mysqld restart 启动出错或者是/usr/sbin/mysqld start 一样出错。
报错信息如下:
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)
解决方法:
根据日志提示查找binlog.index 该文件
看到该文件权限与拥有者为600、root
先备份一份binlog.index 文件
将binlog.index 拥有者设置成mysql
chown mysql:mysql binlog.index
如此设置后再次通过service mysqld restart 启动,则正常。但这里有一定需要特别注意的,就是之前通过root用户创建的表空间需要修改其拥有者为mysql,否则数据不可访问。
推荐:MySQL教程
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)