Chapter 32 MySQL on the OCI Marketplace

Table of Contents

32.1 Prerequisites to Deploying MySQL EE on Oracle Cloud Infrastructure
32.2 Deploying MySQL EE on Oracle Cloud Infrastructure
32.3 Configuring Network Access
32.4 Connecting
32.5 Maintenance

This chapter describes how to deploy MySQL Enterprise Edition as an Oracle Cloud Infrastructure (OCI) Marketplace Application. This is a BYOL product.

Note

For more information on OCI marketplace, see Overview of Marketplace.

The MySQL Enterprise Edition Marketplace Application is an OCI compute instance, running Oracle Linux 7.7, with MySQL EE 8.0. The MySQL EE installation on the deployed image is similar to the RPM installation, as described in Section 2.5.4, “Installing MySQL on Linux Using RPM Packages from Oracle”.

For more information on MySQL Enterprise Edition, see Chapter 30, MySQL Enterprise Edition.

For more information on MySQL advanced configuration, see Secure Deployment Guide.

For more information on Oracle Linux 7, see Oracle Linux Documentation

This product is user-managed, meaning you are responsible for upgrades and maintenance.

32.1 Prerequisites to Deploying MySQL EE on Oracle Cloud Infrastructure

The following assumptions are made:

  • You are familiar with OCI terminology. If you are new to OCI, see Getting Started.

  • You have access to a properly configured Virtual Cloud Network (VCN) and subnet. For more information, see Virtual Networking.

  • You have the permissions required to deploy OCI Marketplace applications in a compartment of your tenancy. For more information, see How Policies Work.

32.2 Deploying MySQL EE on Oracle Cloud Infrastructure

To deploy MySQL EE on Oracle Cloud Infrastructure, do the following:

  1. Open the OCI Marketplace and select MySQL.

    The MySQL listing is displayed.

  2. Click Launch Instance to begin the application launch process.

    The Create Compute Instance dialog is displayed.

    See To create a Linux instance for information on how to complete the fields.

By default, the MySQL server listens on port 3306 and is configured with a single user, root.

Important

When the deployment is complete, the MySQL server is started, and you must connect to the compute instance, and retrieve the default root password which was written to the MySQL log file.

See Connecting with SSH for more information.

The following MySQL software is installed:

  • MySQL Server EE

  • MySQL Enterprise Backup

  • MySQL Shell

  • MySQL Router

MySQL Configuration

For security, the following are enabled:

The following MySQL plugins are enabled:

  • thread_pool

  • validate_password

On startup, the following occurs:

  • MySQL Server reads /etc/my.cnf and all files named *.cnf in /etc/my.cnf.d/.

  • /etc/my.cnf.d/perf-tuning.cnf is created by /usr/bin/mkcnf based on the selected OCI shape.

    Note

    To disable this mechanism, remove /etc/systemd/system/mysqld.service.d/perf-tuning.conf.

    Performance tuning is configured for the following shapes:

    • VM.Standard2.1

    • VM.Standard2.2

    • VM.Standard2.4

    • VM.Standard2.8

    • VM.Standard2.16

    • VM.Standard2.24

    • VM.Standard.E2.1

    • VM.Standard.E2.2

    • VM.Standard.E2.4

    • VM.Standard.E2.8

    • BM.Standard2.52

    For all other shapes, the tuning for VM.Standard2.1 is used.

32.3 Configuring Network Access

For information on OCI Security Rules, see Security Rules.

Important

You must enable ingress on ports 22 (SSH) and 3306 (MySQL), and optionally 33060, if you intend to use MySQL X Protocol.

32.4 Connecting

This section describes the various connection methods for connecting to the deployed MySQL server on the OCI Compute Instance.

Connecting with SSH

This section gives some detail on connecting from a UNIX-like platform to the OCI Compute. For more information on connecting with SSH, see Accessing an Oracle Linux Instance Using SSH and Connecting to Your Instance.

To connect to the Oracle Linux running on the Compute Instance with SSH, run the following command:

ssh opc@computeIP

where opc is the compute user and computeIP is the IP address of your Compute Instance.

To find the temporary root password created for the root user, run the following command:

sudo grep 'temporary password' /var/log/mysqld.log

To change your default password, log in to the server using the generated, temporary password, using the following command: mysql -uroot -p. Then run the following:

ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';

Connecting with MySQL Client

Note

To connect from your local MySQL client, you must first create on the MySQL server a user which allows remote login.

To connect to the MySQL Server from your local MySQL client, run the following command from your shell session:

mysql -uroot -p -hcomputeIP

where computeIP is the IP address of your Compute Instance.

Connecting with MySQL Shell

To connect to the MySQL Server from your local MySQL Shell, run the following command to start your shell session:

mysqlsh \connect root@computeIP

where computeIP is the IP address of your Compute Instance.

For more information on MySQL Shell connections, see MySQL Shell Connections.

Connecting with Workbench

To connect to the MySQL Server from MySQL Workbench, see Connections in MySQL Workbench.

32.5 Maintenance

This product is user-managed, meaning you are responsible for upgrades and maintenance.

Upgrading MySQL

The existing installation is RPM-based, to upgrade the MySQL server, see Section 2.11.6, “Upgrading MySQL Binary or Package-based Installations on Unix/Linux”.

You can use scp to copy the required RPM to the OCI Compute Instance, or copy it from OCI Object Storage, if you have configured access to it. File Storage is also an option. For more information, see File Storage and NFS.

Backup and Restore

MySQL Enterprise Backup is the preferred backup and restore solution. For more information, see Backing Up to Cloud Storage.

For information on MySQL Enterprise Backup, see Getting Started with MySQL Enterprise Backup.

For information on the default MySQL backup and restore, see Chapter 7, Backup and Recovery.