After restarting the MySQL database on the Linux server, various errors were found, causing the MySQL database to fail to work normally.
No matter stop, start or mysql connection, there are different error messages. The specific error messages are:
# service mysqld stop ERROR! MySQL server PID file could not be found! # service mysqld start Starting MySQL.. ERROR! The server quit without updating PID file (/data/mysql/mysql.pid). # mysql -uroot -p ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)
1. Error reason:
In fact, the above three different MySQL errors are all caused by one reason: the root directory disk is full.
2. Check the large files that cause the disk to be full:
1. First, use the df command to check the disk usage:
# df
You may see in the output:
/dev/mapper/VolGroup-lv_root 39841176 37788792 28552 100% /
2. Use # du – sh * to view large files. For example, the root directory is data. Use the command to view:
# cd/data
# du – sh *
You will find that the mysql folder occupies more than n gigabytes, and then view which files:
# cd mysql
# du – sh *
You will find many large files, such as
581M mysql-bin.000029
28K mysql-bin.000030
7.6G mysql-bin.000031
4.0K mysql-bin.000032
These files are MySQL Binary Log binary files, which are mainly used for data recovery and master-slave replication of master-slave servers.
Since I have no master and slave servers, I decided to delete them.
3. Solution:
1. Delete these large files:
# rm -rf mysql-bin.000031
~~~
2. After deleting them, open my.cnf under /etc/, find
log-bin=mysql-bin
binlog_format=mixed
Comment out these two lines, that is, add the “#” sign in front:
#log-bin=mysql-bin
#binlog_format=mixed
3. Restart the MySQL server, and it is OK
service mysqld restart
Read More:
- MySql Warning: The server quit without updating PID file error
- [Solved] MySQL Startup Error: The server quit without updating PID file
- [Solved] Starting MySQL… ERROR The server quit without updating PID file
- MAC MYSQL Start Error: The server quit without updating PID
- Mysql Flashback Warning: C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe
- MySql Install Error: Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘
- MYSQL 5.7 Error Code: 1290. The MySQL server is running with the –secure-file-priv option so it..
- [Solved] ERROR 2002 (HY000): Can’t connect to local MySQL server through socket’/var/lib/mysql/mysql.sock’ (2)
- [Solved] MYSQL Command Execute Error: Can ‘t connect to local MySQL server through socket ‘/tmp/mysql.sock ‘(2) “
- How to Fix MySQL ERROR 1130 (HY000): Host ‘XXXX’ is not allowed to connect to this MySQL server
- ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’
- How to Solve can‘t connect to local mysql server through socket ‘/var/lib/mysql/mysql.sock‘
- Remote connection to MySQL database error: is not allowed to connect to this MYSQL server solution
- How to Solve MYSQL Error: Failed to start MySQL 8.0 database server
- MYSQL Enter password:ERROR 2003 (HY000): Can‘t connect to MySQL server on ‘localhost:3306‘
- Centos7 Initialize mysql Error: Could not open file ‘/usr/local/mysql/log/mysqld.log‘ for error logging: Per
- host ‘‘ is not allowed to connect to this mysql server Connect MYSQL Error
- (Fixed) workbench MySQL Error Code: 2013. Lost connection to MySQL server during query
- MYSQL Insert Data Error: check the manual that corresponds to your MySQL server version for the right syntax
- [Solved] Django configures MySQL Error: NameError: name ”_MySQL ‘is not defined