Mysql version 5.5.x upgrade to 5.6.x step sharing _mysql

Source: Internet
Author: User
Tags flush mysql version

The approximate steps are:

Add the configuration file: Skip-grant-tables parameters, upgrade the Basedir into a new version, start MySQL, execute the command: Mysql_upgrade upgrade the dictionary information, and then flush privileges; Refresh the authorization table, Note: If you are using shared table space, it is best to export the data to the new version and use the Mysql_upgrade upgrade if you are using a standalone tablespace. Such as:

1. Shell > Service mysqld Stop #把实例停掉

Copy Code code as follows:

Shell > Mv/usr/local/mysql/usr/local/mysql.bak #把mysql5 5.x Old Basedir renamed as backup directory
Shell > Cp-ar/data/mysql3306/data/mysql3306.bak The instance data under 5.x to be backed up to avoid an accident during the upgrade process.
Shell > Tar VF xxx.tar.gz-c/usr/local #把mysql5 6.x binary package to the Basedir path, where mysql5.6.27 version is used, download address: wget http:// Mirrors.sohu.com/mysql/mysql-5.6/mysql-5.6.28-linux-glibc2.5-x86_64.tar.gz
Shell > cd/usr/local/
Shell > ln-s mysql-5.6.28-linux-glibc2.5-x86_64 mysql #创建软连接
Shell > \cp-ar/usr/local/mysql.bak/my.cnf/usr/local/mysql/#把旧版basedir下的配置文件复制回来, if your profile is not under Basedir, then there's no need to move.

2. Add under mysqld of configuration file: Skip-grant-tables option:

3.shell > Service mysqld start #启动更新basedir之后的实例

4. Using the Mysql_upgrade command: Checking for incompatible tables, updating the grant table

Shell > Mysql_upgrade-p3306-u root-p ' xx ' #命令输出除了warning外, the table check must be OK, and then log in to MySQL (log in as prompted to see the new version number),
MySQL > Flush privileges;

5. Remove the skip-grant-tables from the configuration file

6. To see if there is any error log errors, at this point can verify the data is abnormal, no exception to indicate that the upgrade was successful

Note: Upgrade can not skip, that is 5.1 to upgrade to 5.6, you must first upgrade to 5.5; After all steps are completed, it is best to restart the mysqld

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.