An error is reported when starting MySQL after the Linux server is restarted. The error information is as follows:
Starting MySQL… ERROR! The server quit without updating PID file (/usr/local/mysql/data/VM_0_9_centos.pid).
Solution:
1. Modify the MySQL configuration file in/etc/my cnf。 Add the following configuration:
basedir = /usr/local/mysql
datadir = /usr/local/mysql/data
log-error = /usr/local/mysql/error.log
pid-file = /usr/local/mysql/mysql.pid
user = mysql
tmpdir = /tmp
2. Initialize and execute some commands in/usr/local/MySQL/scripts:
./mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/mysql.pid --tmpdir=/tmp
This database can be started normally.
However, due to the reinitialization of the database, you will be prompted that you do not have permission when accessing the previous database.
Two commands are required:
chown -R mysql:mysql /usr/local/mysql/
chmod -R 755 /usr/local/mysql/
Tip: the directories here are all my real MySQL installation directories. The directories installed by each person may be different.
Read More:
- MySql Warning: The server quit without updating PID file error
- [Solved] MySQL Startup Error: The server quit without updating PID file
- MAC MYSQL Start Error: The server quit without updating PID
- [Solved] MYSQL Error: ERROR! MySQL server PID file could not be found!
- MYSQL 5.7 Error Code: 1290. The MySQL server is running with the –secure-file-priv option so it..
- ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’
- [Solved] ERROR 2002 (HY000): Can’t connect to local MySQL server through socket’/var/lib/mysql/mysql.sock’ (2)
- Mysql Flashback Warning: C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe
- How to Solve can‘t connect to local mysql server through socket ‘/var/lib/mysql/mysql.sock‘
- [Solved] MYSQL Command Execute Error: Can ‘t connect to local MySQL server through socket ‘/tmp/mysql.sock ‘(2) “
- MySql Install Error: Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘
- MYSQL Enter password:ERROR 2003 (HY000): Can‘t connect to MySQL server on ‘localhost:3306‘
- How to Solve MYSQL Error: Failed to start MySQL 8.0 database server
- MYSQL Insert Data Error: check the manual that corresponds to your MySQL server version for the right syntax
- How to Fix MySQL ERROR 1130 (HY000): Host ‘XXXX’ is not allowed to connect to this MySQL server
- (Fixed) workbench MySQL Error Code: 2013. Lost connection to MySQL server during query
- Remote connection to MySQL database error: is not allowed to connect to this MYSQL server solution
- host ‘‘ is not allowed to connect to this mysql server Connect MYSQL Error
- Centos7 Initialize mysql Error: Could not open file ‘/usr/local/mysql/log/mysqld.log‘ for error logging: Per
- MySQL server has gone away Error [How to Solve]