程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> MYSQL數據庫 >> 關於MYSQL數據庫 >> 解決Linux上安裝MYSQL“mysqld 已死,但是 subsys 被鎖 ”的方法

解決Linux上安裝MYSQL“mysqld 已死,但是 subsys 被鎖 ”的方法

編輯:關於MYSQL數據庫

今天在RED HAT 9上面安裝了MYSQL,但是在service mysql start以後,查看service   MySQL status的時候出現以下提示:

MySQLd 已死,但是 subsys 被鎖

我起初還看了日志文件,日志文件提示:

Cannot initialize InnoDB as 'innodb_data_file_path' is not set.
If you do not want to use transactional InnoDB tables, add a line
skip-innodb
to the [MySQLd] section of init parameters in your my.cnf
or my.ini. If you want to use InnoDB tables, add to the [MySQLd]
section, for example,
innodb_data_file_path = ibdata1:10M:autoextend
But to get good performance you should adjust for your hardware
the InnoDB startup options listed in section 2 at
060806 12:51:01 /usr/libexec/mysqld: Incorrect information in file: './MySQL/host.frm'
060806 12:51:01 MySQLd ended

我把原版的英文發給大家看看:

1. Obviously the 'ole check the log file for anything nasty

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問題都已經解決了

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved