mysql服务器不能正常启动
昨天晚上将服务器重启了,今天数据库连不上了,不知道错误在哪里,在mysql安装文件夹里乱撞。
终于在/usr/local/mysql/data文件夹中找打了liu.err,打开一看错误如下:
080506 11:43:50 mysqld started
080506 11:43:50 InnoDB: Started; log sequence number 0 759524575
/usr/local/devtools/mysql-5.0.45-linux-i686-icc-glibc23/bin/mysqld: File './mysq
l-bin.000002' not found (Errcode: 13)
080506 11:43:50 [ERROR] Failed to open log (file './mysql-bin.000002', errno 13)
080506 11:43:50 [ERROR] Could not open log file
080506 11:43:50 [ERROR] Can't init tc log
080506 11:43:50 [ERROR] Aborting
080506 11:43:50 InnoDB: Starting shutdown...
080506 11:43:52 InnoDB: Shutdown completed; log sequence number 0 759524575
080506 11:43:52 [Note] /usr/local/devtools/mysql-5.0.45-linux-i686-icc-glibc23/b
in/mysqld: Shutdown complete
080506 11:43:52 mysqld ended
对于这个问题,可以在/etc/my.cnf中配置log的具体存放位置,做了如下处理
$ mkdir /var/log/mysql/binary
cd /var/log
$ chown -R mysql:mysql ./mysql/binary
$ chmod =R 770 /var/log/mysql/binary