mysql 5.6 to mysql 5.7 upgrade

When mysql doing that, make sure to stop mysql service.

Setting up a database for the slow off mode, which allows the data in the cache must place orders before closing.

1、mysql -uroot -p -e'set global innodb_fast_shutdown=0;'

     mysqladmin -uroot -p shutdown

2, the original mysql5.6 program directory or soft connection

mv /usr/local/mysql5.6  /usr/local/mysql5.6.bak

rm -rf  /app/mysql

3, the main program using mysql5.7 do soft connection

ln -s /usr/local/mysql-5.7  /app/mysql

 

4, start mysql service

5, redo the system mysql table service (in a production environment must add -s --upgrade-system-tables parameter indicates that only redo the mysql system tables), will not add -s to rebuild all tables in all libraries, so production environment may affect the business. If the version is not the span is too large, do not redo the business table. Upgrade to upgrade from the library in the main library.

 mysql_upgrade  -uroot   -s  

 

 

 

Guess you like

Origin blog.csdn.net/pang_2899/article/details/93160551