Showing entries 11 to 20 of 96
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: OCI (reset)
WordPress in OCI with MySQL HeatWave Read Replicas and MySQL Router R/W Splitting

Some time ago, we saw how we could deploy WordPress on OCI using MySQL HeatWave Database Service with Read Replicas. We had to modify WordPress to use a specific plugin that configures the Read/Write Splitting on the application (WordPress): LudicrousDB.

Today, we will not modify WordPress to split the Read and Write operations, but we will use MySQL Router 8.2.0 (see [1], [2], [3]).

Architecture

The …

[Read more]
MySQL data archiving: another use for HeatWave Lakehouse

The ability to store data on Object Storage and retrieve it dynamically when necessary is a notable advantage of Lakehouse when managing MySQL historical data we would like to archive.

Let’s illustrate this with the following table:

CREATE TABLE `temperature_history` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `time_stamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `device_id` varchar(30) DEFAULT NULL,
  `value` decimal(5,2) NOT NULL DEFAULT '0.00',
  `day_date` date GENERATED ALWAYS AS (cast(`time_stamp` as date)) STORED NOT NULL,
  PRIMARY KEY (`id`,`day_date`),
  KEY `device_id_idx` (`device_id`)
) ENGINE=InnoDB AUTO_INCREMENT=129428417 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci SECONDARY_ENGINE=RAPID
/*!50500 PARTITION BY RANGE  COLUMNS(day_date)
(PARTITION p0_before2023_11 VALUES LESS THAN ('2023-11-01') ENGINE = InnoDB,
 PARTITION p2023_12 VALUES LESS THAN ('2023-12-01') ENGINE = InnoDB,
 PARTITION p2024_01 VALUES LESS THAN …
[Read more]
Is MySQL HeatWave really faster ?

You may have come across numerous presentations showcasing MySQL HeatWave as a Query Accelerator for MySQL. However, if you have not yet had the opportunity to test it yourself (if you have, you already know the answer), allow us to conduct a test using actual data to determine the potential benefits of utilizing a MySQL HeatWave Cluster.

Data & Queries

The data is simple, some arduinos with a DHT22 sensor sending temperature and humidity.

So first let’s have a look at the amount of collected data:

select format_bytes(sum(data_length)) DATA,
       format_bytes(sum(index_length)) INDEXES,
       format_bytes(sum(data_length + index_length)) 'TOTAL SIZE'
from information_schema.TABLES order by data_length + index_length;
+-----------+-----------+------------+
| DATA      | INDEXES   | TOTAL SIZE |
+-----------+-----------+------------+
| 21.89 GiB | 14.06 GiB | 35.95 GiB  |
+-----------+-----------+------------+
1 …
[Read more]
Backup your MySQL instance to the Cloud

Since MySQL Shell 8.1, it’s even easier to create a logical backup of your MySQL instance and store it directly in Object Storage, an internet-scale, high-performance storage platform in Oracle Cloud Infrastructure (OCI).

MySQL Shell now offers the option of dumping to Object Storage Bucket using PAR (Pre-Authenticated Request).

Bucket Creation

The first step is to create an Object Storage Bucket in the OCI Console:

Let’s call it lefred-mysql-backups:

When created, we can click on the three-dots and create a new PAR:

[Read more]
Deploying WordPress and MySQL on OKE using MySQL Operator for Kubernetes

Let’s see how to deploy WordPress and MySQL on a Kubernetes Cluster. The Kubernets cluster we are using is OKE (Oracle Kubernetes Engine) in OCI (Oracle Cloud Infrastructure):

OKE Cluster

We start by creating a Kubernetes Cluster on OCI using the Console:

We select the Quick create mode:

We need to name our cluster and make some choices:

When created, we can find it in the OKE Clusters list:

And we can see the pool of workers nodes and the workers:

kubectl

I like to use kubectl directly on my latop to manage my K8s Cluster.

On my Linux Desktop, I need to install kubernetes-client package (rpm).

Then on the K8s Cluster details, you can click on Access Cluster to get all the commands to use:

We need to copy them on our terminal and then, I like to also enable the bash completion for …

[Read more]
How to copy a MySQL instance ?

To copy a MySQL server to another server or to the cloud, there are several ways.

We can distinguish between two different types of copy:

  • physical copy
  • logical copy

The physical copy is often the fastest. However, it requires some tools to ensure that you have a consistent online backup. For example, you can use MySQL Enterprise Backup (MEB).

Alternatively, it’s possible to use the CLONE plug-in to provision a new instance with existing data from a source server. This is my preferred approach.

Finally, the last physical solution is the use of a file system snapshot, but this requires the right infrastructure and even more care to have a consistent …

[Read more]
Cut & Paste a User Creation Statement with MySQL 8

Sometimes it’s convenient to retrieve the user creation statement and to copy it to another server.

However, with the new authentication method used as default since MySQL 8.0, caching_sha2_password, this can become a nightmare as the output is binary and some bytes can be hidden or decoded differently depending of the terminal and font used.

Let’s have a look:

If we cut the create user statement and paste it into another server what will happen ?

We can see that we get the following error:

ERROR: 1827 (HY000): The password hash doesn't have the expected format.

How could we deal with that ?

The solution to be able to cut & paste the authentication string without having any issue, is to change it as a binary representation (hexadecimal) like this:

And then replace the value in the user create statement:

But there is an easier way. …

[Read more]
Moodle on OCI with MySQL HeatWave: Extended Architectures – part 2

To continue our journey to Moodle on Oracle Cloud Infrastructure using Ampere compute instances and MySQL HeatWave Database Service [1] [2], in this article we will see how to scale our architecture using multiple Moodle instances, High Availability for the Database and Read Scale-Out.

This is the architecture we will deploy:

The same principles can be applied to other projects, not just Moodle.

Multiple Compute Instances & MySQL HeatWave High Availability

The first step is to use again the Stack to deploy the initial resources. We must insure that we use a MySQL Shape that has at least 4 OCPUs

[Read more]
Moodle on OCI with MySQL HeatWave: Extended Architectures – part 1

In the previous post, we saw how to quickly deploy Moodle to Oracle Cloud Infrastructure on Ampere compute instances and using MySQL HeatWave.

In this post, we will explore some other features and the benefits of running on OCI and MySQL HeatWave to extend our architecture dedicated to Moodle in the Cloud.

Read Replicas

Moodle natively offers the possibility of distributing the load between reads and writes. When using MySQL HeatWave Database Service, adding read replicas is also a very easy task. Let’s see how we can benefit from it.

To be able to use MySQL HeatWave Read Replicas, the MySQL shape must have at least 4 OCPUs.

Let’s modify the moodle stack and deploy it again but this time we choose a bigger shape for MySQL:

When everything is ready, …

[Read more]
Deploy Moodle on OCI with Ampere and MySQL HeatWave

If you want to deploy Moodle on OCI, you can use Ampere compute instances as application server and MySQL HeatWave Database Service to store the data.

Depending on your requirements, MySQL HeatWave can provide High Availability and Query Acceleration.

In this post, we will see the easiest and fasted way to deploy the following basic architecture:

In OCI to quickly deploy an architecture and all the required resources, it’s recommended to use a Stack (Terraform recipes and modules).

So deploy all the resources we need (VCN, Subnets, Security Lists, Internet Gateways, Compute Instances…) we just need to click on the following button:

[Read more]
Showing entries 11 to 20 of 96
« 10 Newer Entries | 10 Older Entries »