mysql启动不成功显示The server quit without updating PID file的解决方法
2015-07-23 17:08
816 查看
上午在编译安装mysql的时候 就出现标题中的错误,经实践在第二步操作后启动成功,参考链接
链接http://linuxadministrator.pro/blog/?p=225
You may face this error while restarting MySQL. Below are some fix for the same.
[root@server:~ ] $ service mysqld start
Starting MySQL… ERROR! The server quit without updating PID file
This error can be de to different reasons.
1. Check if there is any running MySQL process by using the following commands and kill all and restart.
ps aux | grep mysql
If you are able to see any mysql process like below, just kill that process.
root@server [~]# ps aux | grep mysql
root 1140 0.0 0.0 4140 676 pts/0 D+ 22:34 0:00 grep mysql
root 2987 0.0 0.0 4736 1288 ? S Sep27 0:00 /bin/sh /usr/bin/mysqld_safe
Now kill it.
kill -9 2987
Make sure that there is no mysql process running at this point. Restart MySQL.
service mysqld restart
2. If the above fix is not working, now we can try some more. It can be due to some conflicting entries in my.cnf
Try moving the mysql config file /etc/my.cnf file and restart mysql.
mv /etc/my.cnf /etc/my.cnf.backup
Restart mysql.
service mysqld restart
3. If none of the above is working, try to move the log file named “ib_logfile” in “/var/lib/mysql” and restart mysql. Sometimes mysql will fail because it face difficulty updating the log file.
mv /var/lib/mysql/ib_logfile* /root/
Restart and see the results.
service mysqld restart
但是在操作了第二步后有人会有疑问,如果没有了my.conf文件,mysql现在的配置文件是哪个呢? 谷歌搜了一下另一位网友的回答。
if it can’t find a my.cnf or my.ini file, MySQL will use its compiled-in defaults. The .cnf/.ini files are not necessary unless you want to override those defaults.
The medium/huge/small/large files you found are suggested setups for that “size” of server. Just pick the one in /etc that suits your needs and rename it to my.cnf (in the same directory), restart mysql, and it should make that configuration take effect.
也就是说这个my.conf你可以根据你主机的内存大小自行设置,而你不更改my.conf这个配置 系统会自动为你采用默认的配置,我想不能启动的原因,有可能就是自己配置错了。
链接http://linuxadministrator.pro/blog/?p=225
You may face this error while restarting MySQL. Below are some fix for the same.
[root@server:~ ] $ service mysqld start
Starting MySQL… ERROR! The server quit without updating PID file
This error can be de to different reasons.
1. Check if there is any running MySQL process by using the following commands and kill all and restart.
ps aux | grep mysql
If you are able to see any mysql process like below, just kill that process.
root@server [~]# ps aux | grep mysql
root 1140 0.0 0.0 4140 676 pts/0 D+ 22:34 0:00 grep mysql
root 2987 0.0 0.0 4736 1288 ? S Sep27 0:00 /bin/sh /usr/bin/mysqld_safe
Now kill it.
kill -9 2987
Make sure that there is no mysql process running at this point. Restart MySQL.
service mysqld restart
2. If the above fix is not working, now we can try some more. It can be due to some conflicting entries in my.cnf
Try moving the mysql config file /etc/my.cnf file and restart mysql.
mv /etc/my.cnf /etc/my.cnf.backup
Restart mysql.
service mysqld restart
3. If none of the above is working, try to move the log file named “ib_logfile” in “/var/lib/mysql” and restart mysql. Sometimes mysql will fail because it face difficulty updating the log file.
mv /var/lib/mysql/ib_logfile* /root/
Restart and see the results.
service mysqld restart
但是在操作了第二步后有人会有疑问,如果没有了my.conf文件,mysql现在的配置文件是哪个呢? 谷歌搜了一下另一位网友的回答。
if it can’t find a my.cnf or my.ini file, MySQL will use its compiled-in defaults. The .cnf/.ini files are not necessary unless you want to override those defaults.
The medium/huge/small/large files you found are suggested setups for that “size” of server. Just pick the one in /etc that suits your needs and rename it to my.cnf (in the same directory), restart mysql, and it should make that configuration take effect.
也就是说这个my.conf你可以根据你主机的内存大小自行设置,而你不更改my.conf这个配置 系统会自动为你采用默认的配置,我想不能启动的原因,有可能就是自己配置错了。
相关文章推荐
- (组图)Win10 RTM正式版Build 10240更新哪些内容?激活有变
- Android UI 之 SeekBar
- Android UI 之 SeekBar
- HDU 1159 Common Subsequence(LCS)
- SAPUI5-Routing
- 【从零开始学NGUI 】 (七)Atlas制作
- ios8 UITableView设置 setSeparatorInset:UIEdgeInsetsZero不起作用的解决办法
- HDOJ 1047 Integer Inquiry(多次大数相加)
- Android面试---Handler,Looper,MessageQueue
- Android UI
- easyui获取当前点击对象tabs的title
- UISlider两边都可以滑动
- Map sort by value
- Codeforces Round #313 (Div. 2) D. Equivalent Strings(简单搜索)
- java 根据value进行并发同步操作
- NetSuite crm国内合作商来讲讲NetSuite常见问题
- String 与StringBuilder
- HDU 1242 Rescue(DFS or BFS)
- EF中使用SqlQuery进行参数化查询时抛出异常
- UIScrollView - 常用方法总结