Showing entries 1 to 10 of 284
10 Older Entries »
Displaying posts with tag: 8.0 (reset)
MySQL InnoDB’s Instant Schema Changes: What DBAs Should Know

In MySQL 8.0.12, we introduced a new algorithm for DDLs that won’t block the table when changing its definition. The first instant operation was adding a column at the end of a table, this was a contribution from Tencent Games.

Then in MySQL 8.0.29 we added the possibility to add (or remove) a column anywhere in the table.

For more information, please check these articles from Mayank Prasad : [1], [2]

In this article, I want to focus on some dangers …

[Read more]
Deploying MySQL on OCI using OpenTofu

I could have set MySQL between parenthesis in the title as this article is more about how to use OpenTofu to deploy on OCI.

I will explain how to install OpenTofu and how to use it to deploy on OCI. I will also mention what are the required changes be able to use my previous Terraform deployment files.

As an example, let’s use the modules to deploy WordPress with MySQL HeatWave Database Service: oci-wordpress-mds.

Installing OpenTofu

If like me you are using a RPM based Linux distro, you can find the necessary information to create the yum repository on OpenTofu’s website:

$ sudo su -
# cat >/etc/yum.repos.d/opentofu.repo <<EOF
[opentofu]
name=opentofu …
[Read more]
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]
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]
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]
Where to find official MySQL container images ?

If you are deploying MySQL on containers, one of the first tasks is to find the right image.

There’s a certain amount of confusion, especially when we’re trying to help someone who’s having problems with their deployment.

For example, when people say I’m using the official docker image… what does that really mean?

Docker Hub, provides their official image (https://hub.docker.com/_/mysql), but this is not the official MySQL image that we, the MySQL Team at Oracle, support.

Before the mess with Docker Hub ([1], [2], [3]), the real official images for MySQL …

[Read more]
MySQL 8 and Replication Observability

Many of us, old MySQL DBAs used Seconds_Behind_Source from SHOW REPLICA STATUS to find out the status and correct execution of (asynchronous) replication.

Please pay attention of the new terminology. I’m sure we’ve all used the old terminology.

However, MySQL replication has evolved a lot and the replication team has worked to include a lot of useful information about all the replication flavors available with MySQL.

For example, we’ve added parallel replication, group replication, … all that information is missing from the the good old SHOW REPLICA STATUS result.

There much better ways to monitoring and observing the replication process(es) using Performance_Schema.

Currently in Performance_Schema, there are 15 tables relating to replication instrumentation:

+------------------------------------------------------+
| …
[Read more]
Build MySQL 8 from the source rpm in OL8

After having explained how to build MySQL 8 (MySQL 8.0 and MySQL 8.1) on OL9 and OL7, this episode of the series will cover how to build MySQL 8 on Oracle Linux 8 (OL8) and compatible (EL8, CentOS 8, …).

My build machine is a VM.Standard.E4.Flex instance on OCI having 8 OCPUs and 128GB of ram with Oracle Linux 8.8. The machine has also a block volume of 50GB attached and mounted in /home/opc/rpmbuild:

Getting the source RPM

To get the source RPM, you need first to install the MySQL Community’s repo:

$ sudo dnf install -y https://dev.mysql.com/get/mysql80-community-release-el8-7.noarch.rpm

But comparing to OL7 and OL9, this is maybe the most complicate process if you are not aware …

[Read more]
Showing entries 1 to 10 of 284
10 Older Entries »