mysql 5.7 Upgrade 5.1 upgrade

You can not upgrade from version 5.1 to 8.0

You can upgrade from version 5.1 to 5.7 can repair most Vulnerability

 

Enter the following command in the command line you can, if you see an error, then copy directly to Google on OK:

[root@localhost /]# vim /var/log/mysqld.log

 

Looked under the boot log

[sql] view plain copy

  1. [ERROR] Fatal error: mysql.user table is damaged. Please run mysql_upgrade.  

[sql] view plain copy

  1. ERROR: Zend_Db_Adapter_Exception: SQLSTATE[HY000] [2002] No such file or directory  
  2. Additionally, an exception has occurred while trying to report this error: Zend_Exception  
  3. No entry is registered for key 'translate' (Abstract.php:144)  

FML, this supposed wave of google search to this article https://support.plesk.com/hc/en-us/articles/115001659169-MySQL-fails-to-start-mysql-user-table-is- damaged

    Specific solutions are as follows

    a. Log in to that server host top

    b. Skip the Add-Grant-in the Tables  /etc/my.cnf File an under  [mysqld] Section meaning is to open safe mode (no authentication password or something)

    c.  service mysqld start 

   d.  mysql_upgrade

   e.  service mysqld restart 

    I perform a bit mysql_upgrade 

Investigation of the investigation of official documents, the general meaning is not very compatible upgrade after a lot of things, provide work space before the official script to fix

Sure enough, before the seamless upgrade mysql database user databases are still not affected

At this point the upgrade is complete.

 

1, the backup database

mysqldump -u xxx -h xxx -P 3306 -p --all-databases > databases.sql

 

2. Stop the MySQL service, enter the command:

service mysqld stop

 

3. Check the installed software: rpm -qa|grep mysql

 

卸载mysql:yum remove mysql mysql-server mysql-libs 

 

4, after removal command, then see if there can be residual mysql, enter the command:

yum list installed | grep mysql

 

5, download and install the latest rpm files.

 

6, install MySQL, enter the command (process asked if yes, y all the way down):

yum install mysql-community-server

7. After the installation is complete, enter the command to view the version number of MySQL:

mysql -V

 

Reference:   https://www.cnblogs.com/vickygu2007/p/5066409.html

        https://www.cnblogs.com/lxwphp/p/9138737.html

http://www.zsythink.net/archives/2345

 

https://dev.mysql.com/downloads/repo/yum/

https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/#repo-qg-yum-upgrading

https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/

 

 

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin blog.csdn.net/BlueBirdssh/article/details/90763479