Mysql:starting MySQL ..... error! The server quit without updating PID file

Source: Internet
Author: User
Tags safe mode

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

Start MySQL today met this problem, online search, the results of various changes to files, delete files are purely pit Dad, the above site found the problem solution ~ The foreigner summed up really good! Take it and learn it for yourself.

This step-by-step-mainly for FreeBSD, however-the idea was 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 was done. Unfortunately, the upgrade process is not smooth every time. Sometimes it would throw me some error.

1. Start MySQL
2, the following error was found
  
Starting MySQL ..... error! The server quit without updating PID file.

3. The error message clearly locates the problem you are having.
Starting MySQL ..... error! The server quit without updating PID file (/var/db/mysql/www.icesquare.com.pid).
Three solutions are as follows:
Solution 1:reboot The computer restarts your PC 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-on-is-to-start everything over. For example, I experienced this problem today after upgrading the Apache 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. This is due to the update, you can restart the computer to solve. Solution 2:remove Your MySQL config file delete your profile

If you had modified your MySQL configuration file, MySQL may not be like it few versions after (MySQL isn't backward compat Ibility friendly). It can be the problem of using a unsupported variable, or something similar. The easiest-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'll 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 if 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 at 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.0m101112 10:49:16 innodb:completed initialization of Buffer pool101112 10:49:16 innodb:highest supported file format is barracuda.101112 10:49:17 innodb:1.1.3 started; Log sequence number 1589404101112 10:49:17 [ERROR] Fatal Error:can ' t open and Lock privilege tables:table ' Mysql.proxies _priv ' doesn ' t exist101112 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 isn't compatible with the current ver Sion. 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:
If You do 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:mysqllooking for ' mysqlcheck ' as:mysqlcheckrunning ' mysqlcheck ' with connection arguments: '--por t=3306 '--socket=/tmp/mysql.sock ' Running ' mysqlcheck ' with connection arguments: '--port=3306 '--socket=/tmp/ Mysql.sock ' Mysql.columns_priv okmysql.db okmysql                                  . event Okmysql.func Okmysql.general_log                                 Okmysql.help_category Okmysql.help_keyword Okmysql.help_relation Okmysql.help_topic OK                                       Mysql.host Okmysql.ndb_binlog_index Okmysql.plugin                                   Okmysql.proc Okmysql.procs_priv Okmysql.servers                                     Okmysql.slow_log Okmysql.tables_priv                        Okmysql.time_zone Okmysql.time_zone_leap_second Okmysql.time_zone_name okmysql.time_zone_transition Okmysql.tim E_zone_transition_type okmysql.user okrunning ' Mysql_fix_privil Ege_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 was up and running again!

Happy mysqling.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.