Link to home
Start Free TrialLog in
Avatar of marrowyung
marrowyung

asked on

how can I upgrade my MySQL InnoDB cluster based on MySQL 8.0.17 generic binary?

hi,

with referring to:

https://www.experts-exchange.com/questions/29153130/how-to-upgrade-MySQL-InnodB-cluster.html?anchor=a42953346¬ificationFollowed=238198440&headerLink=account_loggout&anchorAnswerId=42953346#a42953346

how can i get the generate binary of MySQL 8.0.x ?

I am now using MySQL 8.0.12 generaic binary to setup the InnodB cluster and I am not sure how to upgrade it easily, any idea?

ANY node i instlal MySQL and MySQL router will not have internet connection and I want to upgrade it to MySQL 8.0.17 InnoDB cluster


any idea on how to upgrade it ?
ASKER CERTIFIED SOLUTION
Avatar of Tomas Helgi Johannsson
Tomas Helgi Johannsson
Flag of Iceland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of marrowyung
marrowyung

ASKER

David ,

"Use Distro packages."

I am sorry, Distro package is  ? from APT repository or yum repository ?

"Don't do it."

why ?

here a  lot of people do it in this way and do not want to install via yum local install the rpm package, they think it is much easier than rpm!

Tomas,

"What OS are you running on ?

redhat linux 7

"https://lefred.be/content/mysql-innodb-cluster-upgrade-from-8-0-11-to-8-0-12/"

this kind assume each of the mysql nodes has internet connection so they can use yum update for it but I don't have, we install using generic binary.


":If you are running on RHEL then just download the rpm packages and move them to your offline hosts and
issue rpm -Uhv <rpmfile> then follow the upgrade recommendations found here and here."

so by this command we can create he generic binary from the rpm files ? if I do this command for all RPM package in the MySQL download, any SAME file will overwrite again and again ? just keep the last one ?

\"You can always download the generic binaries unzip them and replace the old with the new with simple mv commands and then follow the above upgrade steps."

so I think you are referring to the tar.gz files, right? today I tried to download more than one version and unzip it and see what is inside, so that tar.gz is what I want ?

this page is what I am referring to :
https://dev.mysql.com/doc/refman/8.0/en/binary-installation.html#binary-installation-unpack

and for generic binary I am referring to is from this page:

https://dev.mysql.com/downloads/mysql/

User generated image
how about MySQL router and shell, how to upgrade it too ?
1) Distro packages are .deb + .rpm files produced by each Distro.

2) how about MySQL router and shell, how to upgrade it too ?

All MySQL code is packaged into (in your case), a set of .rpm files which must be installed together.
"All MySQL code is packaged into (in your case), a set of .rpm files which must be installed together."

I mean the correct order of installation ! shell first ? router in the router/management nodes first   ? any yum upgrade command which upgrade using Router and shell .rpm files downloaded ?  our MySQL router node do not have internet connection either.

I just know for all DB nodes , read only slave first and finally the master node.
You can either figure out the order by trial + error, or you can include all .rpm dependencies together + usually yum will sort out the correct order.

Not always. Just usually.
hi,

when I take a look on the folder structure of MysQL 8.0.12 and the upgrade procedure confuse me,

As I need to run the mysqld process in the bin folder to start that mysql, if I have put the existing mysql 8.0.12 folder inside the same folder as mysql8.0.18 folder , then I run the mysql_upgrade from mysql8.0.18 to upgrade the data in mysql8.0.12, am I going to refer to the same my.cnf ?

The existing my.cnf has the existing /data folder information and if I run mysql_upgrade command from mysql8.0.18  folder, should upgrade everything inside mysql 8.0.12 /data directory, right?  Then I am not sure once upgrade, the data folder inside the old mysql 8.0.12 will be used by mysqld process in mysql8.0.18  or not, as /data folder still inside  mysql 8.0.12 folder ! seems doesn't make any sense !

My mysql 8.0.12 folder and mysql8.0.18 folder is store in the same location, and from your point of view, how can I make use of the mysql_upgrade from mysql8.0.18 folder to update data in mysql 8.0.12/data ? what if I remove mysql 8.0.12 folder once the upgrade is done, everything in the OLD data folder will be gone !

what my guess is about is
1) copy everything we need in data folder of mysql8.0.12 to the SAME location in mysql8.0.18 folder of one of the slave node.
2) then we run the mysql_upgrade from the mysql8.0.18/bin folder of that slave node,
3) start the mysql8.0.18 mysqld process to start mysql 8.0.18 of that slave node.
4) by this the NEW mysql8.0.18 , once start, it will join back the InnodB cluster, and replicate what is lag behind.
5) we login using workbench and see what version is it now.
6) we MySQL shell to MySQL router and check cluster.status()
7) once the cluster status() seems the new nodes and everything is healthy, we do the SAME upgrade process above to the next slave node until no slave node still in old version.
8) finally we do the same upgrade to the primary node.

is it right?

and on 1) , what folders inside mysql8.0.12 folder I have to copy to the mysql8.0.18 folder ?

this is my current my.cnf content:

User generated image
this is my MySQL serve 8.0.12 file structure:

User generated image
8.0.18

User generated image
hi,

As a lot of company here only accept generic binary and I figured out how to upgrade it and it involve deeply understanding of the upgrade process of MysQL and the my.cnf files ! I done the upgrade myself finally !