MySQL Binary Package update MySQL 5.7 With mysql_upgrade

Source: Internet
Author: User

MySQL Binary Package update MySQL 5.7 With mysql_upgrade

MySQL is usually deployed using binary packages. Therefore, when you upgrade MySQL, You can decompress the latest MySQL package to basedir, of course, if MySQL does not have any data, you can delete it and reinstall it. During the update, you must stop the MySQL service, note: In the production environment, you need to perform a proper backup switch before upgrading. In the next upgrade, you can only perform normal version iterations, but not verbose version updates, for example, upgrading from 5.1 to 5.7 is not feasible. Normally, the upgrade from 5.6 to 5.7 is normal. The following describes how to use mysql_upgrade in a binary package for Version Upgrade:

# Start upgrading after the MySQL process is disabled

[Root @ localhost ~] # Cd/usr/local/

[Root @ localhost local] # rm-rf mysql

[Root @ localhost local] # tar-jxvf/usr/local/src/mysql-5.7.17-linux-glibc2.5-x86_64.tar.bz2-C ./

[Root @ localhost local] # Music mysql-5.7.17-linux-glibc2.5-x86_64 mysql

[Root @ localhost local] # cat/etc/ld. so. conf. d/mysql. conf # Check whether the lib path is correct.

/Usr/local/mysql/lib

[Root @ localhost local] # ldconfig-v # reload the latest package to the system. Note that some MySQL-dependent software may need to be recompiled.

[Root @ localhost local] #/etc/init. d/mysqld start # Try to start. Note that some variable parameters in MySQL 5.7 are canceled. It is best to query my on another installed MySQL 5.7 server. whether the variable in cnf exists. If it does not exist, the parameter has been canceled in the new version until it is started.

[Root @ localhost local] #/usr/local/mysql/bin/mysql_upgrade-u root-p # update and upgrade using mysql_upgrade

In support of mysql_upgrade, the old version of data will be checked and modified. After the upgrade is confirmed, the new version of MySQL will be generated under databasedir after the upgrade is complete, start MySQL, upgrade complete

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.