MySQL Commercial Yum Repo Extended

By | December 30, 2019

Many things in the MySQL 8.0 Series has evolved. I’ve discussed many of those things in prior blogs such as items like the MySQL-Router w/InnoDB Cluster, plus a Series on Enterprise Backup with InnoDB Cluster Backup & Restore Use Cases. But now its time to update everyone on the evolution of the Yum Repo packaging in MySQL 8.0.18! I’ve discussed the Yum repo before, and shared how to use it.

If you are using:
RHEL/OL/CentOS v6/7/8
SLES12, SLES15 or
OpenSuse15
… then you are in for a treat.
Let’s Review!
—————————
For Community Repo Setups, please continue to refer to this documentation URL:
https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/

Jump Right to it, What’s New!

MySQL has been providing various ways for delivering both commercial and open-source binaries to end users. As of MySQL 8.0.18 they have extended their pre-built Repo packages that are available to commercial users.  This means the following:

  • Repo packages for the Supported OS’s noted above have always included the core associated Server binaries:
    • Since MySQL 8.0 was GA (8.0.11), the MySQL Enterprise Backup and the MySQL Router were included.
  • As of MySQL 8.0.18, extra packages are now included with them:
    • ALL MySQL Repo packages include EE Connectors: C/C++, C/Java, C/ODBC & the MySQL-Shell client
    • ALL “but” RHEL6 include: C/Python
    • Workbench EE included ONLY ON: RHEL v7/8 x86(64bit)

The above additions make for a truly “ease-of-use” experience, particularly for supporting application servers that are associated to small and large scale MySQL roll-outs supporting both cloud & on-premise deployments.

A view of a sample MySQL Repo with this packaging!

Take note of the highlighted extra packages available in 8.0.18.

Also, if you have MySQL 5.7 deployments, its useful to have the MySQL 8.0 Repo available for 2 reasons:

  1. Access to the MySQL Shell’s Upgrade checker to assist in facilitating upgrade activities to 8.0.
  2. Access to the latest 8.0 connectors, as using the latest connectors will both assist upgrades to 8.0, but also give you the latest patch updates and feature capabilities

 

Building your Repo Server

For using the MySQL Commercial Enterprise binaries, you can build your own on-premise or cloud MySQL Commercial Repo Server. My prior repo-server blog post identifies the steps, however I’ll repeat them here with more precision. They include:

  1. Go to the Oracle Support Website
  2. Select “Patches & Updates
  3. Choose the vertical tab  “Product or Family (Advanced)
  4. Product:  “MySQL Server
  5. Release: “MySQL Server 8.0
  6. Platform: “Linux x86-64” OR “Linux ARM 64-bit” (as the case may be)
  7. Description: “MySQL Database” (this will provide options for OL/RHEL/etc & SUSE) or put the Version of MySQL for the description, like “8.0.18” (whichever is easier)

Now that you have found your package that you need to download…

  1. click on its “Patch Name” on the left side of its listing
  2. On the window that opens up, click the “Download” button on the right hand side
  3. The next window has a link for the package. DON’T CLICK ON IT…..
    1. Instead, click on the blue colored link below named “WGET Options
    2. It will download a text file to your computer named wget.sh.
    3. create the wget.sh file and copy/paste the script inside the file on the server you want to download your files to.
    4. Make the file an executable on your Linux server and run it.
    5. It will prompt for your Oracle SSO username. Once you hit <enter> it will wait (and may or may not  prompt) for you to type your SSO password, then hit <enter> again when you are done. NOTE: it won’t show the characters as you type the password, but it does wait for you to finish and hit <enter>.

You’ll notice the zip packages on the server… those are the downloaded repo packages you can load into your repo server.

Configuring the Webserver

Then configuring the repo packages

Unpackage the zip files containing the

Now we will move the files that provide the RPM repo structure into the webserver

Implementing the client-side Yum mysql.repo

The Servers that are defined to use this repo should have a yum configuration file (using a file extension “.repo”) defining the source location of the Repo Server, among other settings.  The mysql.repo file and its contents are defined in the README.txt file in the download of the repo package. 

For example, using a web server with hostname example.com and with the
tarball unpacked in a directory exposed as /repo/ from the webserver,
the contents of the mysql.repo file on each database host should be as
follows:

In the sample above, it shows two ways of configuring a repo file.

  1. The first stanza titled [mysql-8.0]  (when enabled=1) would have the latest MySQL rpm files to be served.
  2. The 2nd stanza titled  [mysql-8.0.18]  (when enabled=1) would have the defined patch version of MySQL 8.0 (in this case 8.0.18) to be served.

My Own Scripted install of the client mysql.repo file

Re-using the repo for configuration scripts

When I build these repo setups, I use a simple apache webserver, and host the REPO files on a directory in the webroot named “repo”. I also re-use the server as a git repo for shell scripts that I use to provision the server instances that I have created in my Oracle Cloud OCI environment. The git repo’s files are hosted outside of the webroot, so they are not exposed. For any updated release of my code, I copy it into the webroot’s “files” directory.

 

Hoping this blog post highlights some new opportunities as we go into 2020, and beyond!

Leave a Reply

Your email address will not be published. Required fields are marked *

one × 3 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.