1 问题
[root@localhost mysql]# /etc/rc.d/init.d/mysql status
MySQL is not running, but lock file (/var/lock/subsys/mysql[FAILED]
[root@localhost mysql]# /etc/rc.d/init.d/mysql start
Starting MySQL...The server quit without updating PID file (/usr/local/mysql/data/localhost.localdomain.pid). [FAILED]
2 原因
没有初始化权限表
3 解决办法
#cd /usr/local/mysql(进入mysql安装目录)
#chown -R mysql.mysql .
#su - mysql
$cd server
$scripts/mysql_install_db
4 本人解决过程
[root@localhost ~]# cd /usr/local/mysql
[root@localhost mysql]# chown -R mysql.mysql .
[root@localhost mysql]# su - mysql
[mysql@localhost ~]$ cd /usr/local/mysql
[mysql@localhost mysql]$ scripts/mysql_install_db
Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
Alternatively you can run:
./bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd ./mysql-test ; perl mysql-test-run.pl
Please report any problems with the ./bin/mysqlbug script!
[mysql@localhost mysql]$ /usr/local/mysql/bin/mysqld_safe --user=mysql &
[1] 11767
[mysql@localhost mysql]$ 120502 07:01:17 mysqld_safe Logging to '/usr/local/mysql/data/localhost.localdomain.err'.
120502 07:01:17 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
[mysql@localhost mysql]$ /etc/rc.d/init.d/mysql status
MySQL running (11830) [ OK ]
[mysql@localhost mysql]$ /etc/rc.d/init.d/mysql start
Starting MySQL [ OK ]
附一文:MySQL: Starting MySQL….. ERROR! The server quit without updating PID file
FROM: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 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.
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
转:http://blog.sina.com.cn/s/blog_637e04c9010117ri.html
相关推荐
The server quit without updating PID file”的启动错误时,通常意味着服务器未能成功启动并更新其进程ID(PID)文件,这可能是由于多种原因造成的。以下是一些可能的解决方案: 1. **数据目录权限问题**: 如果...
在Linux系统,特别是CentOS上...以上就是在CentOS上安装MySQL时可能出现的"The server quit without updating PID file"问题的详细解释及其解决办法。遵循这些步骤和建议,应能顺利解决这个问题并成功部署MySQL服务。
MySQL数据库在运行过程中可能会遇到各种问题,其中一种常见的错误是"The server quit without updating PID file"。这个错误通常意味着MySQL服务器无法正常启动或关闭,没有更新其进程ID(PID)文件,这可能导致...
然而,当遇到"MYSQL: The server quit without updating PID file"这样的错误时,通常意味着MySQL服务在启动过程中遇到了问题,无法正确地创建或更新其进程ID(PID)文件。PID文件用于记录MySQL服务的进程ID,以便...
主要介绍了MySQL启动时报“The server quit without updating PID file”错误的原因,需要的朋友可以参考下
MySQL数据库在运行过程中可能会遇到各种问题,其中一种常见的错误是"Starting MySQL.Manager of pid-file quit without updating file.[FAILED]"。这个错误通常表明MySQL服务在尝试启动时遇到了问题,导致进程管理器...
错误提示表明MySQL无法更新PID文件,这可能是由于MySQL进程未正确关闭或PID文件被其他进程占用。首先,确认PID文件(`/disk/mysql/www.pid`)是否存在,并且MySQL服务器没有在后台运行。可以使用`ps -ef | grep mysql...
在使用MySQL数据库的过程中,有时会遇到“MySQL server PID file could not be found”的错误,这是一个常见的启动问题,通常意味着MySQL服务器无法找到其进程ID(PID)文件,该文件用于记录数据库服务的运行状态。...
当尝试启动MySQL服务时,可能会遇到“MySQL server PID file could not be found!”这样的错误,这通常意味着MySQL找不到其进程ID(PID)文件,或者是PID文件所在路径不正确。在示例中,错误日志显示服务器在启动过程...
Linux下安装初始化完MySQL数据库之后,使用... The server quit without updating PID file (/data/mysql/AY14020816093477605eZ.pid). 重启mysql会抛出上面红色字体的错误。 上面只能看到mysql启动失败,具体
The server quit without updating PID file (/var/run/mysqld/mysqld.pid)` - **解析**:这表明MySQL服务异常退出,并且没有更新进程ID(PID)文件,提示我们数据库可能已损坏。 3. **决定下一步行动**:基于上述...
首先,从描述中的错误日志可以看出,MySQL服务器在尝试启动时,无法更新PID(进程ID)文件。这通常意味着MySQL在启动过程中遇到了异常,导致服务未能正常运行。错误日志中还显示了一系列InnoDB相关的警告和信息,...
The server quit without updating PID file (/home/hadoop/ruanJian/mysql/data/Slave1.Hadoop.pid). ``` 这通常是由于MySQL尝试以非预期的用户身份运行导致的,例如: ```bash 2016-08-30 15:56:49 1990 [ERROR...
The server quit without updating PID file (/var/lib/mysql/darker.pid).` **解决:** 调整`innodb_buffer_pool_size`大小。 ```ini [mysqld] innodb_buffer_pool_size=8M ``` #### 五、安装PHP ##### 1. 解压...