跳至主要内容

mysql error

某日重启mysql遇到以下错误
bash-3.00# /etc/rc3.d/S99mysql startStarting MySQL.... ERROR! Manager of
pid-file quit without updating file.

差错误日志
081211 11:02:41 InnoDB: Starting shutdown...081211 11:02:42 InnoDB:
Shutdown completed; log sequence number 0 46419081211 11:02:42 [Note]
/opt/mysql6/bin/mysqld: Shutdown complete
081211 11:02:42 mysqld_safe mysqld
from pid file /opt/mysql6/data/testenv.atu.pid ended081211 11:04:23 mysqld_safe
Starting mysqld daemon with databases from /opt/mysql6/data081211 11:04:23
InnoDB: Started; log sequence number 0 46419081211 11:04:24 [ERROR] mysqld: File './mysql-bin.000018' not found (Errcode:
13)
081211 11:04:24 [ERROR] Failed to open log (file './mysql-bin.000018',
errno 13)081211 11:04:24 [ERROR] Could not open log file081211 11:04:24 [ERROR]
Can't init tc log081211 11:04:24 [ERROR] Aborting
081211 11:04:24
InnoDB: Starting shutdown...081211 11:04:25 InnoDB: Shutdown completed;
log sequence number 0 46419081211 11:04:25 [Note] /opt/mysql6/bin/mysqld:
Shutdown complete
081211 11:04:25 mysqld_safe mysqld from pid file
/opt/mysql6/data/testenv.atu.pid ended


The error which had been highlighted.
Then
bash-3.00# ../bin/perror 13OS error code 13: Permission denied
bash-3.00#ls -la
-rw-rw---- 1 root root 126 Dec 10 14:53 mysql-bin.000016
-rw-rw---- 1 root root 952 Dec 11 11:04 mysql-bin.000017
-rw-rw---- 1 root root 684783 Dec 11 11:04 mysql-bin.000018

so you may find the three files the owner which is not mysql, so change the owner
bash-3.00# chown mysql:mysql mysql-bin.000016
bash-3.00# chown mysql:mysql mysql-bin.000017
bash-3.00# chown mysql:mysql mysql-bin.000018
bash-3.00# /etc/rc3.d/S99mysql startStarting MySQL... SUCCESS!

评论

此博客中的热门博文

4 steps to delete account in Gerrit DB

4 steps to delete account in DB. Delete from accounts where preferred_email=’’; delete from account_ssh_keys where account_id=''; delete from account_external_ids where external_id='gerrit:*’; delete from account_external_ids where external_id='username:*’; whatever it was in H2 database and postgres db . H2: ssh -p 24198 localhost gerrit gsql Postgres: psql

繁忙的周末

回了杭州,周五跟老爹吃夜宵,周六跟一群人玩,好乐迪9折加对折,然后夜宵,长肉。 跟老妈逛街。。花了我一千大洋,买了2件外套了受不了了。 结果。。唉。。去赶火车结果没坐上,改签,跟老妈发脾气。。让我多睡了10分钟结果拉下了火车。 然后做七点四十七的车,一路出战一路狂奔赶地铁。。 终于赶上了。 真不容易,还是要提早啊

mod

apache安装后,如果想再添加模块,往往不想重新安装一次,再者,我在安装中发现,并不是安装文件中所有的modules都会被默认安装,即使在安装中使用了 ./configure --prefix=/usr/local/apache --enable-so --enable-modules=all --enable-mods-shared=all也是如此。我使用上述方法安装的apache2.2.6就没有安装proxy相关模块。这时,需要手工生成so文件,但会自动的被复制到你的apache安装目录的modules中,然后修改apache的配置文件,加载相关模块,验证apache配置并重启服务即可。以上描述的具体操作步骤如下: 操作系统:linux redhat 4.5 ES apache版本:2.2.6 可自行下载tar包 1. 拷贝安装包到/usr/local,并在目标目录下进行解压。[root@localhost local]# cd /usr/local[root@localhost local]# tar -zxvf httpd-2.2.4.tar.gz2. 配置安装参数,安装的目标目录为/usr/local/apache,建议设置enable-mods-shared=all,不用的module注释掉就行了![root@localhost local]# cd httpd-2.2.4[root@localhost httpd-2.2.4]# ./configure --prefix=/usr/local/apache --enable-so --enable-mods-shared=all3. 编译并安装。[root@localhost httpd-2.2.4]# make[root@localhost httpd-2.2.4]# make install4. 启动Apache,并测试。[root@localhost httpd-2.2.4]# cd /usr/local/apache/bin[root@localhost bin]# ./apachectl start 打开浏览器,并在地址栏中输入主机的IP地址如 http://192.168.1.254/ 如果出现以下画面则说明安装成功。It works! 注意:安装完成后检查系统服务中的HTTPD服务是否已...