Upgrade MySQL 5.6.23 to MySQL 5.7.9

Source: Internet
Author: User

Upgrade MySQL 5.6.23 to MySQL 5.7.9

Upgrade MySQL 5.6.23 to MySQL 5.7.9

New Features of MySQL 5.7.9

I. Security

1.1. The plugin field of mysql. user cannot be blank. The default value is mysql_native_password instead of mysql_old_password. The old password format is no longer supported;

1.2. added the Password Expiration mechanism. After the password expires, you must change the password. Otherwise, the password may be disabled or enter the sandbox mode;

1.3. Use mysqld -- initialize for initialization. By default, a random password is automatically generated, and no account except root @ localhost is created or test Library is created;

After changing to mysqld -- initialize, if the data file already exists in the target directory to which datadir points, a similar prompt will appear:

2015-11-20T17: 03: 38.200709Z 0 [ERROR] -- initialize specified but the data directory has files in it. Aborting.

2015-11-20T17: 03: 38.200807Z 0 [ERROR] Aborting

Therefore, you must first ensure that the datadir target directory is empty to avoid misoperation to damage existing data.

Ii. Upgrade

2. Extract tar-zxvf mysql-5.7.9-linux-glibc2.5-x86_64.tar.gz

2. Put version 5.7.9 under the default directory.

Music mysql-5.7.9-linux-glibc2.5-x86_64/usr/local/mysql

Disable mysql5.6.23 Database service mysql stop

2. 3. Modify the data path of/etc/my. cnf. The existing database mysql5.6.23 has run the business data on/mnt/sda4/mysql5.6.23/data

Datadir =/mnt/sda4/mysql5.6.23/data

2. 4. start service mysql start

. Try to insert and check whether the data is normal

[Root @ sam tt] #/usr/local/mysql/bin/mysql-uroot-h127.0.0.1 test-e "select * from dsp_monitors where time = '2017-11-19 14:03:00';"

+ ---- + ---------- + ----------- + --------------------- + -------------- + --------------- + ---------- +

| Id | exchange | flowType | size | time | requestCount | filteredCount | outPriceCount | bidCount |

+ ---- + ---------- + ----------- + --------------------- + -------------- + --------------- + ---------- +

| 1 | tt | desktop | 250X250FC | 14:03:00 | 0 | 431884 | 0 | 0 |

| 2 | tt | desktop | 250X250FC | 14:03:00 | 0 | 431884 | 0 | 0 |

+ ---- + ---------- + ----------- + --------------------- + -------------- + --------------- + --

This article permanently updates the link address:

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.