转自: http://icesquare.com/wordpress/mysql-starting-mysql-error-the-server-quit-without-updating-pid-file/

他也是更新系统后出现的这个问题,我是更新之后出现的该问题,所以按照他的思路删掉配置文件就可以启动了,至于为什么会出现这种问题,回头有时间再仔细研究下。

This step-by-step guide is mainly for FreeBSD, however the idea is the same for Linux. Every once a while, when I update my FreeBSD box, the system likes to shutdown my MySQL server. Therefore, I need to start it again after the update is done. Unfortunately, the upgrade process is not smooth every time. Sometimes it will throw me some error.

 
/usr/local/etc/rc.d/mysql.server start 

Oh well, I got the following error messages:

Starting MySQL..... ERROR! The server quit without updating PID file. 

Sometimes, the message will tell you the exact location of which PID file:

Starting MySQL..... ERROR! The server quit without updating PID file (/var/db/mysql/www.icesquare.com.pid). 

There are several solutions to troubleshoot these problems. I will go over each one by one.

Solution 1: Reboot The Computer

 

Although it sounds simple, but it really works. During the system upgrade, the OS may disable some of your daemons. Instead of troubleshooting each one by one, the easiest way is to start everything over. For example, I experienced this problem today after upgrading theApache and Ruby (Yes, MySQL is not part of the update), and I got this error message afterward. After rebooting the computer, the error message is gone.

Solution 2: Remove Your MySQL Config File

If you have modified your MySQL configuration file, MySQL may not like it few versions after (MySQL is not backward compatibility friendly). It can be the problem of using an unsupported variable, or something similar. The easiest way is to remove your configuration file, and try to start the MySQL server again:

Backup your MySQL configuration first.

mv /etc/my.cnf /etc/my.cnf.backup 

And restart the MySQL server again:

/usr/local/share/mysql/mysql.server start 

Hopefully you will see the following message:

Starting MySQL. SUCCESS! 

Solution 3: Upgrade Your Database File

Sometimes, the newer MySQL doesn’t like the database created in earlier version. I discovered this when I upgrade to MySQL 5.5.7:

Starting MySQL..... ERROR! The server quit without updating PID file (/var/db/mysql/www.icesquare.com.pid). 

Since MySQL tells me which PID file causes the problem, I open the file and take a look what’s going on:

sudo tail /var/db/mysql/www.icesquare.com.err 

And I saw something interesting: tables: Table ‘mysql.proxies_priv’ doesn’t exist:

101112 10:49:16  InnoDB: Initializing buffer pool, size = 128.0M 101112 10:49:16  InnoDB: Completed initialization of buffer pool 101112 10:49:16  InnoDB: highest supported file format is Barracuda. 101112 10:49:17  InnoDB: 1.1.3 started; log sequence number 1589404 101112 10:49:17 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.proxies_priv' doesn't exist 101112 10:49:17 mysqld_safe mysqld from pid file /var/db/mysql/www.icesquare.com.pid ended 
 

The reason is very simple. MySQL could not open a table created in the earlier version (< 5.7.7) because it is not compatible with the current version. So, we can try to start the MySQL in safe mode through rc.d. First, you can edit the /etc/rc.conf and put the following into the file:

mysql_enable="YES" mysql_args="--skip-grant-tables --skip-networking" 

Restart MySQL through rc.d:

/usr/local/etc/rc.d/mysql-server start 

If you did it right, you should see something like the following:

Starting MySQL.. SUCCESS! 

Now, MySQL is already running the safe-mode. We want to perform a MySQL upgrade on all tables:

sudo mysql_upgrade 

You should see something like this:

Looking for 'mysql' as: mysql Looking for 'mysqlcheck' as: mysqlcheck Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/tmp/mysql.sock' Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/tmp/mysql.sock' mysql.columns_priv                                 OK mysql.db                                           OK mysql.event                                        OK mysql.func                                         OK mysql.general_log                                  OK mysql.help_category                                OK mysql.help_keyword                                 OK mysql.help_relation                                OK mysql.help_topic                                   OK mysql.host                                         OK mysql.ndb_binlog_index                             OK mysql.plugin                                       OK mysql.proc                                         OK mysql.procs_priv                                   OK mysql.servers                                      OK mysql.slow_log                                     OK mysql.tables_priv                                  OK mysql.time_zone                                    OK mysql.time_zone_leap_second                        OK mysql.time_zone_name                               OK mysql.time_zone_transition                         OK mysql.time_zone_transition_type                    OK mysql.user                                         OK Running 'mysql_fix_privilege_tables'... OK 

Now, we want to switch the MySQL back to normal mode by commenting the extra options in /etc/rc.conf:

mysql_enable="YES" #mysql_args="--skip-grant-tables --skip-networking" 

And restart MySQL through /etc/rc.d:

/usr/local/etc/rc.d/mysql-server restart 

Now the MySQL is up and running again!

Happy MySQLing.

–Derrick

[转]MySQL: Starting MySQL….. ERROR! The server quit without updating PID file的更多相关文章

  1. 启动mysql报错 -- ERROR! The server quit without updating PID file

    开发说某个测试环境的mysql,无法重启了,报以下错误提示: # service mysqld restart Shutting down MySQL.. SUCCESS! Starting MySQ ...

  2. 启动mysql出现了error the server quit without updating pid file (/var/lib/mysql/localhost.localdomain.pid)

    原来是我的mysql日志太多,所以去/data/log/mysql目录(这个目录是从/etc/my.cnf中的log-error确定的)下删除了 rm -rf mysql_binary_log.*的日 ...

  3. linux mysql -- ERROR! The server quit without updating PID file (/usr/local/mysql/data/localhost.localdomain.pid)

    转载 http://blog.csdn.net/caiyaodeng/article/details/45937183 linux 链接mysql 报错 ERROR! The server quit ...

  4. MySQL: Starting MySQL….. ERROR! The server quit without updating PID file解决办法

    MySQL: Starting MySQL….. ERROR! The server quit without updating PID file解决办法 1 问题 [root@localhost m ...

  5. centos6.6下编译安装mysql5.6之后启动失败:Starting MySQL... ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid).

    今天在编译安装mysql5.6时候出现Starting MySQL... ERROR! The server quit without updating PID file (/var/lib/mysq ...

  6. Starting MySQL.. ERROR! The server quit without updating PID file (/usr/local/mysql/var/AYXXXXXXXXXXX.pid). 错误解决方法

    /etc/init.d/mysql start无法启动MySQL错误信息如下: ERROR! MySQL server PID file could not be found! Starting My ...

  7. mysql启动时报错:Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.pid)

    mysql启动报错Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.p ...

  8. Starting MySQL. ERROR! The server quit without updating PID file如何解决

    今天数据库突然挂了.重启提示: Starting MySQL. ERROR! The server quit without updating PID file (/usr/local/mysql/v ...

  9. Starting MySQL... ERROR! The server quit without updating PID file 问题解决

    今天遇到一个mysql起不来,不知为啥挂了,启动是下面的报错 Starting MySQL... ERROR! The server quit without updating PID file 后来 ...

随机推荐

  1. 经典!HTML5 Canvas 模拟可撕裂布料效果

    这是一个模拟可撕裂布料效果的 HTML5 Canvas 应用演示,效果逼真.你会看到,借助 Canvas 的强大绘图和动画功能,只需很少的代码就能实现让您屏息凝神的效果. 温馨提示:为保证最佳的效果, ...

  2. CORS(跨域资源共享)

    前言:上一篇文章在写如何使用JSONP实现跨域请求的时候,偶然间提到CORS,即Cross-Origin Resource Sharing(跨域资源共享).虽然前些天也看了一下CORS相关的文章,但是 ...

  3. 30分钟手把手教你学webpack实战

    30分钟手把手教你学webpack实战 阅读目录 一:什么是webpack? 他有什么优点? 二:如何安装和配置 三:理解webpack加载器 四:理解less-loader加载器的使用 五:理解ba ...

  4. UITableViewDataSource协议

    前言: 在iOS开发中,表视图UITableView 是我们做UI界面设计时的重要视图. 那么,使用表视图UITableView 需要遵守哪些协议呢? <UITableViewDataSourc ...

  5. [outlook]打开以后就自动进入安全模式的解决方法。Outlook start in safe mode.

    给客户写了一个Outlook的add-in, 用现在时髦的话应该叫outlook的app. 这个add-in的作用就是把outlook中的email,直接上传到SharePoint中.想要代码的联系我 ...

  6. Iphone 英语语言下通讯录排序问题

    Iphone 如果把界面语言设置成English,那么通讯录默认排序是通过拼音来排的,如果联系人信息中没有设置名字的拼音,那么这些联系人都会被放到#中. 批量添加拼音的解决方案: https://gi ...

  7. html框架—多对话框(相同id)处理

    一个网站的数据大多数都是异步刷新的,这没什么好说的,然后现在很多前后端框架,大家都知道框架很好用,不用自己写样式,只要利用框架上的语法就能做出漂亮的动态的效果来,而用框架的话大多数的动态效果都是动态生 ...

  8. iOS Address Book指南

    尽管OC是一门面向对象的语言,但是在你做开发的时候你会发现,并不是所有你用的frameworks都是面向对象的.有些是用C写的,例如Address Book的API,接下来让我们去学习一下Addres ...

  9. zendstudio文件编码修改问题

    转载:http://blog.csdn.net/kunlong0909/article/details/7818620 朋友,在zendstudio ide中,你是否碰到导入一个项目后,发现项目中文件 ...

  10. 通过跳板机建立信任,对多个tomcat服务统一安装部署(shell编写)

    unifyDeploy 自动化统一安装部署 系统版本: unifyDeploy0.1 文件编号: 0.1 发布日期: 2014-06-26 编    制: WangYong 版权所有 内部资料注意保密 ...