Mysql启动报错’./mysql-bin.index’ not found的解决方案

今天试着更改了mysql的数据存储目录(如何更改mysql的存储目录),但是启动mysql一直提示Starting MySQL. ERROR! The server quit without updating PID file (/data/mysql/11Z.pid).

于是乎去查看mysql的错误日志,cat /data/mysql/11Z.err 。

131204 09:09:15 mysqld_safe Starting mysqld daemon with databases from /data/mysql
/usr/local/mysql/bin/mysqld: File './mysql-bin.index' not found (Errcode: 13)
131204  9:09:15 [ERROR] Aborting
131204  9:09:15 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
131204 09:09:15 mysqld_safe mysqld from pid file /data/mysql/11Z.pid ended
131204 09:09:22 mysqld_safe Starting mysqld daemon with databases from /data/mysql
/usr/local/mysql/bin/mysqld: File './mysql-bin.index' not found (Errcode: 13)
131204  9:09:22 [ERROR] Aborting
131204  9:09:22 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
131204 09:09:22 mysqld_safe mysqld from pid file /data/mysql/11Z.pid ended

错误Errcode: 13,这个一般都是权限的问题,使用命令chown -R mysql.mysql /data/mysql/ 更改权限后,重新启动mysql,一切正常。

还没有评论,快来抢沙发!

发表评论

  • 😉
  • 😐
  • 😡
  • 😈
  • 🙂
  • 😯
  • 🙁
  • 🙄
  • 😛
  • 😳
  • 😮
  • emoji-mrgree
  • 😆
  • 💡
  • 😀
  • 👿
  • 😥
  • 😎
  • ➡
  • 😕
  • ❓
  • ❗
  • 67 queries in 0.411 seconds