Mysql服務器無法啟動,錯誤日志中提示:
^G/usr/local/mysql/bin/mysqld: File './mysql-bin.000013' not found (Errcode: 13)
120415 8:59:10 [ERROR] Failed to open log (file './mysql-bin.000013', errno 13)
120415 8:59:10 [ERROR] Could not open log file
120415 8:59:10 [ERROR] Can't init tc log
120415 8:59:10 [ERROR] Aborting www.2cto.com
==============================
一查看是mysql-bin.000013文件的權限變為了:
-rw-rw---- 1 root root 126 Apr 15 00:10 mysql-bin.000013
原因是我上次使用了"/usr/local/mysql/bin/mysqld_safe --user=root &"啟動mysqld,所以產生的binlog文件權限變為root。
提醒一下啟動mysql最好不要使用root用戶,官方文檔提倡用非root用戶啟動;
作者 rover0