解決Linux上安裝MYSQL“mysqld 已死,但是 subsys 被鎖 ”的方法
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
http://www.innodb.com/ibman.html
060806 12:51:01 /usr/libexec/mysqld: Incorrect information in file: './mysql/host.frm'
060806 12:51:01 mysqld ended
我感覺日志文件好象不怎么對,說實話對于一個新手來說,我連.cnf文件在哪里都不知道,我后來在MYSQL的論壇里找到了解決方法,至于原理,我還沒有漫漫體會,我把原版的英文發(fā)給大家看看:
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 inits 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問題都已經(jīng)解決了
關(guān)鍵字:安裝MYSQL、subsys、日志文件
新文章:
- CentOS7下圖形配置網(wǎng)絡(luò)的方法
- CentOS 7如何添加刪除用戶
- 如何解決centos7雙系統(tǒng)后丟失windows啟動項
- CentOS單網(wǎng)卡如何批量添加不同IP段
- CentOS下iconv命令的介紹
- Centos7 SSH密鑰登陸及密碼密鑰雙重驗證詳解
- CentOS 7.1添加刪除用戶的方法
- CentOS查找/掃描局域網(wǎng)打印機IP講解
- CentOS7使用hostapd實現(xiàn)無AP模式的詳解
- su命令不能切換root的解決方法
- 解決VMware下CentOS7網(wǎng)絡(luò)重啟出錯
- 解決Centos7雙系統(tǒng)后丟失windows啟動項
- CentOS下如何避免文件覆蓋
- CentOS7和CentOS6系統(tǒng)有什么不同呢
- Centos 6.6默認(rèn)iptable規(guī)則詳解