Options to Run MySQL Server in OCI (and use MySQL Analytics Service)

MySQL 3 options install in OCI

If you started looking at running your MySQL database on the cloud and thought that taking your data to Oracle Cloud Infrastructure (OCI) is an option (and wondering about integrating to the new MySQL Acnalytics service), well that is probably the natural choice, because MySQL can integrate easily with OCI services like cloud backups in OCI Object Storage service and OCI keyring for transparent data encryption. I will share a few options with advantages of every solution, so to put the idea into practice.

  • MySQL Database Service (MDS)
  • MySQL on the OCI Marketplace
  • MySQL on OCI do-it-yourself

MySQL Database Service (MDS)

The brand new MySQL Database Service is the easiest way to run your Server in OCI, as it offers several features to simplify the life of a database administrator.

In particular, among main advantages of running an MDS DB System, there are:

  • Ad-hoc initial configuration based on the compute shape selected
  • Automatic and transparent upgrade to the latest MySQL release
  • Automatic scheduled backup
  • One-click manual backup when desired
  • Inbound managed replication: for additional cloud redundancy, this MDS instance can be a slave of an on-premises instance or of another MySQL instance running in OCI
  • Can load and upload data dumps (full instances, schemas or tables) from and to OCI Object Storage
  • Has direct access to MySQL Analytics Service (MAS)

This option requires the least intervention from an administrator, as it’s fully managed with regard to principal DBA’s maintenance duties.

MySQL on the OCI Marketplace

Oracle Marketplace is an ecosystem of 3rd party solutions installable with a click into one’s OCI tenancy. These come preconfigured, so there is no struggle to download, install, configure. Just use. MySQL is no exception, and a ready-to-go solution is available on the Marketplace. There are two paths to install MySQL in a new compute instance from Marketplace. Browse it from the dashboard and search for MySQL.

And you’re one click away from installing it.

Alternatively, it is possible to install a new compute instance as usual and choose a MySQL Image besides choosing the desired shape (which will determine the initial database default configuration).

This will install a compute instance and will prepare, initialise and start the MySQL Server instance with an ad-hoc configuration based on the selected shape. Read more about the auto-configuration from docs.

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

Appropriate values will configure the instance, such as:

  • max_connections
  • innodb_buffer_pool_instances
  • innodb_buffer_pool_size
  • temptable_max_ram
  • innodb_log_files_in_group

Just to mention a few. Advantages of running MySQL Server from a Marketplace solution:

  • Low deployment time, no complex choices to make along the operation but indicate the desired shape and subnet
  • Ad-hoc configuration
  • No additional block volume to manage, all is in the default boot volume
  • One-click volume backup via boot volume backup (in addition to custom backup strategy)

This solution is not managed like MDS, so it offers no automatic upgrade, scheduled full and incremental instance backup, and indeed no direct access to MySQL Analytics. This solution can take advantage of Object Storage to store MEB backups or logical backups or use OCI keyring.

MySQL on OCI do-it-yourself

This option is no mistery to traditional on-premises MySQL Server DBAs. Just take MySQL packages to an existing compute instance (e.g. use scp to copy the RPMs), and install the way you’re used to. No ad-hoc configuration is automatically generated, no automatic backup nor upgrade to latest version. Basically, same possibilities as MySQL on the Marketplace, without auto-installer and generated ad-hoc configuration. If you want to have a fully configurable solution (with all the hurdles it takes to make upgrades, backups and managing configuration changes) but you want to be quick at deploying the Server, you can still have a look at innodb_dedicated_server setting which, if used, pre-configures the instance with basic settings such as buffer pool or redo log size. Enough to make sure you start with a decent configuration to exploit host resources, but leaving you time for fine performance tuning later on.

And MySQL Analytics?

Yes, and what about MySQL Analytics? You may have heard about the new Oracle MySQL Analytics Service. If not, highlights from Edward Screven are here:

Analytics service links natively to MySQL Database Service (see picture above), but if you are running on-premises databases, you can still have fastest analytics on the market available using MySQL Database Service inbound replication. Just replicate your on-premises or OCI instances to an MDS DB System and compute the most performing analytics using RAPID Analytics Engine!

If you are running a custom MySQL Server install or MySQL Server from the Marketplace, you can indeed use inbound replication feature to replicate your data to MDS and use MySQL Analytics Engine (MDS supports currently only one inbound channel, so to use Analytics Engine for more Servers, just create the corresponding MDS instance).

Replicate MySQL (custom install or from Marketplace) to MDS and use Analytics

Read more about MySQL Analytics Service.

Leave A Comment