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: