mysql无法启动
启动服务器:
$ sudo /usr/local/mysql/bin/mysqld_safe -user=mysql &
$ 120712 15:35:12 mysqld_safe Logging to '/usr/local/mysql/var/mysql-test.err'.
120712 15:35:12 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
120712 15:35:12 mysqld_safe mysqld from pid file /usr/local/mysql/var/db-app1.pid ended
查看错误日志: $ sudo tail -n -200 mysql-test.err
日志内容:
120712 15:28:48 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
120712 15:28:48 [Warning] Ignoring user change to 'ser=mysql' because the user was set to 'mysql' earlier on the command line
/usr/local/mysql/libexec/mysqld: File './mysql-bin.~rec~' not found (Errcode: 13)
120712 15:28:48 [ERROR] MYSQL_BIN_LOG::open_purge_index_file failed to open register file.
120712 15:28:48 [ERROR] MYSQL_BIN_LOG::open_index_file failed to sync the index file.
120712 15:28:48 [ERROR] Aborting
120712 15:28:48 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete
120712 15:28:48 mysqld_safe mysqld from pid file /usr/local/mysql/var/db-app1.pid ended
大家帮忙看下 怎么回事啊
------解决方案--------------------直接运行 mysqld_safe 呢
------解决方案--------------------用mysqld启动 别直接调用mysql_safe
------解决方案--------------------权限的问题,检查你mysql数据文件的权限,是不是mysql,
然后启动时 mysqld_safe --user=mysql ,而不是 -user=mysql,看你的日志
120712 15:28:48 [Warning] Ignoring user change to 'ser=mysql' because the user was set to 'mysql' earlier on the command line
------解决方案--------------------mysql文件权限看看。