mysql dead but subsys locked 问题
2015-01-09 13:20
381 查看
我是先用rpm 安装了mysql,然后又编译安装了一个mysql 后来我把他们都删了,又用rpm 安装,可是还是不行
网上找的两种方法都试过了,还是不行,
shell> service mysqld stop
shell> rm -fr /var/lib/mysql/*
shell> rm /var/lock/subsys/mysqld
shell> killall mysqld
shell> service mysqld start
含义如下:
1. 停止MYSQL服务
2. 删除/var/lib/mysql/下的所有文件,我想这些文件可能是MYSQL5.1留下来的.
3. 删除锁定文件
4. 杀死所有mysqld进程
5. 启动MYSQL服务
cat /var/log/mysqld.log
2. Stop the service
service mysqld stop
3. Check to see if the service stopped, it might be calling the wrong pid.
ps aux | grep mysql
4. Kill any mysql process that might still be running.
kill -9 ??? ???
5. (CAREFUL) Remove/move/backup any databases from the data directory, only do this step if you need to.
rm -Rf /var/lib/mysql/*
6. Check your global options configuration file, should be similar to stevanbt's initial post.
cat /etc/my.cnf
7. Copy over one of the preconfigured 'sample' server-specific options file. Global (/etc/my.cnf) file has priority over server-specific file, but these have more options in them and have been tuned for a certain role.
cp /usr/share/doc/mysql-server-?.??.??/my-small.cnf /var/lib/mysql
8. Recreate the initial databases, this step is optional as the initscripts will do this anyway.
mysql_install_db
9. Check and set the runlevels for the service.
chkconfig --level 345 mysqld on
chkconfig --list mysqld
10. Start the service.
service mysqld start
11. Check the log file (step 1)
Thats just a basic step through check, most of you have probably already done this.
其实做到step 9问题都已经解决了。
网上找的两种方法都试过了,还是不行,
方法一
解决办法如下shell> service mysqld stop
shell> rm -fr /var/lib/mysql/*
shell> rm /var/lock/subsys/mysqld
shell> killall mysqld
shell> service mysqld start
含义如下:
1. 停止MYSQL服务
2. 删除/var/lib/mysql/下的所有文件,我想这些文件可能是MYSQL5.1留下来的.
3. 删除锁定文件
4. 杀死所有mysqld进程
5. 启动MYSQL服务
方法二
1. Obviously the 'ole check the log file for anything nastycat /var/log/mysqld.log
2. Stop the service
service mysqld stop
3. Check to see if the service stopped, it might be calling the wrong pid.
ps aux | grep mysql
4. Kill any mysql process that might still be running.
kill -9 ??? ???
5. (CAREFUL) Remove/move/backup any databases from the data directory, only do this step if you need to.
rm -Rf /var/lib/mysql/*
6. Check your global options configuration file, should be similar to stevanbt's initial post.
cat /etc/my.cnf
7. Copy over one of the preconfigured 'sample' server-specific options file. Global (/etc/my.cnf) file has priority over server-specific file, but these have more options in them and have been tuned for a certain role.
cp /usr/share/doc/mysql-server-?.??.??/my-small.cnf /var/lib/mysql
8. Recreate the initial databases, this step is optional as the initscripts will do this anyway.
mysql_install_db
9. Check and set the runlevels for the service.
chkconfig --level 345 mysqld on
chkconfig --list mysqld
10. Start the service.
service mysqld start
11. Check the log file (step 1)
Thats just a basic step through check, most of you have probably already done this.
其实做到step 9问题都已经解决了。
相关文章推荐
- 无故出现 mysql dead but subsys locked的问题
- 登录mysql出现/var/lib/mysql/mysql.sock不存在以及mysql dead but subsys locked的问题
- 无故出现 mysql dead but subsys locked的问题
- 登录mysql出现/var/lib/mysql/mysql.sock不存在以及mysql dead but subsys locked的问题
- 安装Apache后查看httpd状态出现“httpd dead but subsys locked”问题
- vsftpd dead but subsys locked 的解决方法
- rhel4下 vsftpd dead , but subsys locked --解除方法汇总
- vsftpd dead , but subsys locked --解除方法汇总(Red Hat Enterprise Linux 4)
- SSH: sshd dead but subsys locked
- sendmail dead but subsys locked
- sshd 已死 但是subsys被锁或者Sshd dead but subsys locked
- crond dead but subsys locked
- memcached dead but subsys locked
- MYSQL dead but pid file exists问题
- httpd dead but subsys locked!
- httpd dead but subsys locked 解决办法
- 如何解决mysqld dead but subsys locked
- Gmond dead but subsys locked 解决方案
- Apache:httpd dead but subsys locked
- httpd dead but subsys locked;No space left on device:Couldn't create accept loc