Today, after installing the mysql-5.1.73 software with the shell script of one click installation of MySQL, we found that MySQL could not be started all the time and still reported an error after repeated execution. We had to check the error log and found the following two errors:
error 1: fatal error: can’t open and lock privilege tables: table ‘mysql. Host’ doesn’t exist
error 2: InnoDB: error: combined size of log files must be & lt; 4 G
Obviously, error 1 means that the system table is missing, and error 2 means that the total size of the redo log exceeds 4GB
After inquiry https://bugs.mysql.com It is found that this is a bug, and the reply on stackoverflow is roughly as follows:
delete the files related to MySQL installation, such as/etc/my.cnf,/usr/bin/MySQL,/var/lib/MySQL and $dataDir folder, and then restart the server and install again
link here: https://stackoverflow.com/questions/9083408/fatal-error-cant-open-and-lock-privilege-tables-table-mysql-host-doesnt-ex
After doing so, the installation is successful. Check your installation script and find that there is no command to delete the $dataDir folder
The guess is that the installation package downloaded by WGet for the first time had a slight accident due to network reasons, resulting in the lack of mysql.host table in the system table space under the data file generated for the first time, resulting in the error of startup failure
The second error is an accompanying error, the IB in the data file_ The logfile has not been deleted, resulting in the total capacity exceeding 4GB in the second installation (the limit was changed to 512gb after 5.6.2)
Finally, the installation script is improved and the command to delete the data file is added