日期:2014-05-16 浏览次数:20711 次
初始化玩数据库之后,使用mysqld_safe启动mysql数据库,如下发现,启动失败
[root@SVNServer bin]# ./mysqld_safe --user=mysql&
[1] 20539
[root@SVNServer bin]# 110806 00:32:19 mysqld_safe Logging to '/usr/local/mysql5.5/data/SVNServer.err'.
110806 00:32:20 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql5.5/data
110806 00:32:20 mysqld_safe mysqld from pid file /usr/local/mysql5.5/data/SVNServer.pid ended
上面只能看到mysql启动失败,具体的原因,需要查看数据库目录下的.err文件,查看.err文件,内容如下:
110806 00:32:20 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql5.5/data
^G/usr/local/mysql5.5/bin/mysqld: File './mysql-bin.index' not found (Errcode: 13)
110806? 0:32:20 [ERROR] Aborting
110806? 0:32:20 [Note] /usr/local/mysql5.5/bin/mysqld: Shutdown complete
110806 00:32:20 mysqld_safe mysqld from pid file /usr/local/mysql5.5/data/SVNServer.pid ended
红色字标出来的就是这次错误报告,errcode13,一般就是权限问题,mysql用户是否对数据库目录内的所有文件具有写的权限,查看一下权限,将data目录的有所者赋给mysql用户,
redhat系统中可以使用,chown mysql.mysql -R data
好了,现在再启动一下mysql
?
?
?