MySQL prompt: the solution to the TheserverquitwithoutupdatingPIDfile problem was found by using the df command. the disk was full, because the partition was used by the system default at that time, and I don't know why I couldn't automatically resize it! We will handle this issue later! :
[Root @ snsgou ~] # Df
File System 1 K-block used available % mount point
/Dev/mapper/vg_snsgou-lv_root
51606140 47734848 1249852 100%/
Tmpfs 1953396 88 1953308 1%/dev/shm
/Dev/sda1 495844 37062 433182 8%/boot
/Dev/mapper/vg_snsgou-lv_home
229694676 191796 217835016 1%/home
[Root @ snsgou ~] #
An error occurred while restarting the database after deleting useless logs.
[Root @ snsgou mysql] # service mysql restart
MySQL server PID file cocould not be found! [Failed]
Starting MySQL... The server quit without updating PID file (/usr/local/mysql/data/snsgou. pid). [failed]
There are many possible causes of the problem after Google's deployment. The best way to do this is to check the error log first:
1. it may be that the/usr/local/mysql/data/mysql. pid file has no write permission.
Solution: Grant permissions, execute "chown-R mysql: mysql/var/data" "chmod-R 755/usr/local/mysql/data", and then restart mysqld!
2. the mysql process may already exist in the process.
Solution: Run "ps-ef | grep mysqld" to check whether the mysqld process exists. if the "kill-9 process number" is used to kill the process and restart mysqld!
3. mysql may be installed on the machine for the second time. the service startup may be affected due to residual data.
Solution: go to the mysql data directory/data to see, if there is a mysql-bin.index, just remove it, it is the culprit. I am using the third solution!
4. mysql will use/etc/my when the configuration file is not specified at startup. cnf configuration file. open this file to check whether the data directory (datadir) is specified in [mysqld ).
Solution: set this line in [mysqld]: datadir =/usr/local/mysql/data
5. skip-federated field problems
Solution: Check whether the skip-federated field has been commented out in the/etc/my. cnf file. if so, comment out the field immediately.
6. the error log directory does not exist.
Solution: Use the "chown" "chmod" command to grant the mysql owner and permissions.
7. selinux. if it is a centos system, selinux is enabled by default.
Solution: close it, open/etc/selinux/config, change SELINUX = enforcing to SELINUX = disabled, and then save the disk and restart the machine.