Below you can find the steps to upgrade Mysql 5.7.xx to 5.7.27.
Here we are using In-Place Upgrade. which means we are upgrading the mysql version on the existing server only which is completely different from logical upgrade.
1)
First download right version of Mysql software. do this.
Go to Patches and downloades -> click product or family -> enter Mysql in product and check release you want(5.7.27) -> platform that you need (here it is linux) -> select description and enter 5.7.27 -> search.
download the zip version(here it is linux)
p30076436_570_Linux-x86-64.zip
2) Unzip p30076436_570_Linux-x86-64.zip
3) check what rpm's are installed on your server for mysql by doing this
rpm -qa mysql* or use rpm -V mysql*
4) when you are about to upgrade. Take VM snapshot or take a backup of mysql data.
5) login into mysql and check below variables setting.
show variables like 'innodb_fast_shutdown';
6) run below command to set below variable.
mysql -u root -p --execute="SET GLOBAL innodb_fast_shutdown=0"
7)
mysqladmin -u root -p shutdown or systemctl stop mysqld (as root)
ps -ef| grep mysqld
8) use below command to upgrade all the rpm's(with dependencies). check the list you have to upgrade and edit the below command. run as "root "
rpm -Uhv mysql-commercial-{server,libs,libs-compat,client,common,embedded,embedded-compat}-5.7.27-1.1.el7.x86_64.rpm
Here we are using In-Place Upgrade. which means we are upgrading the mysql version on the existing server only which is completely different from logical upgrade.
1)
First download right version of Mysql software. do this.
Go to Patches and downloades -> click product or family -> enter Mysql in product and check release you want(5.7.27) -> platform that you need (here it is linux) -> select description and enter 5.7.27 -> search.
download the zip version(here it is linux)
p30076436_570_Linux-x86-64.zip
2) Unzip p30076436_570_Linux-x86-64.zip
3) check what rpm's are installed on your server for mysql by doing this
rpm -qa mysql* or use rpm -V mysql*
4) when you are about to upgrade. Take VM snapshot or take a backup of mysql data.
5) login into mysql and check below variables setting.
show variables like 'innodb_fast_shutdown';
6) run below command to set below variable.
mysql -u root -p --execute="SET GLOBAL innodb_fast_shutdown=0"
7)
mysqladmin -u root -p shutdown or systemctl stop mysqld (as root)
ps -ef| grep mysqld
8) use below command to upgrade all the rpm's(with dependencies). check the list you have to upgrade and edit the below command. run as "root "
rpm -Uhv mysql-commercial-{server,libs,libs-compat,client,common,embedded,embedded-compat}-5.7.27-1.1.el7.x86_64.rpm
9) once rpms are installed with no errors. start mysql
systemctl start mysqld --- as root (you can use sudo commands if you have to)
monitor mysqld.log... if you see this below messages.. ignore for now and proceed to next step.
( output from mysqld.log
[Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name. Please run mysql_upgrade
[Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name. Please run mysql_upgrade
)
10) run mysql upgrade command and monitor all tables. they should resturn "OK" and "Upgrade process completed successfully" in the end.
mysql_upgrade -u root -p
12) do this step only if you seeing the above similar warnings only after mysql_upgrade.
drop table mysql.innodb_index_stats;
drop table mysql.innodb_table_stats;
and run the mysql_upgrade -u root -p
12) Post checks after upgrade.
select version();
show databases;
select count(*) from table_name;
13). bounce mysql.
Hope this helps....
No comments:
Post a Comment