Showing entries 1 to 10 of 24
10 Older Entries »
Displaying posts with tag: router (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 8.2 Read/Write Splitting: a what cost ?

We’ve seen in previous articles what Transparent Read/Write Splitting is with MySQL 8.2 and how to use it with MySQL Connector/Python.

I love this new feature, but I was wondering if it was really worth it.

Will the application benefit from offloading reads to another node, and won’t using the MySQL Router and parsing the request slow down connections?

These are the kinds of questions I’d like to cover and answer in this article.

The environment

To perform the test, I use the following environment:

  • Linux Kernel 5.15.0 – aarch64
  • MySQL Community Server 8.2.0
  • MySQL Router 8.2.0
  • sysbench 1.1.0 using LuaJIT 2.1.0-beta3
[Read more]
How to use MySQL 8.2 read/write splitting with Connector/Python

As you know, one of the most eagerly waited features was released with MySQL 8.2: the transparent read/write splitting.

In this post, we’ll look at how to use it with MySQL-Connector/Python.

Architecture

To play with our Python program, we will use an InnoDB Cluster.

This is an overview of the cluster in MySQL Shell:

JS > cluster.status()
{
    "clusterName": "fred", 
    "defaultReplicaSet": {
        "name": "default", 
        "primary": "127.0.0.1:3310", 
        "ssl": "REQUIRED", 
        "status": "OK", 
        "statusText": "Cluster is ONLINE and can tolerate up to ONE failure.", 
        "topology": {
            "127.0.0.1:3310": {
                "address": "127.0.0.1:3310", 
                "memberRole": "PRIMARY", …
[Read more]
How to get client’s IP address when using MySQL Router ?

When you connect to a server (or cluster) using a TCP proxy level 7, also referred to as an application-level or Layer 7 proxy (highest level of the OSI model), the application doesn’t connect directly to the back-end server(s). The proxy usually understands the protocol used and can eventually take some decisions or even change the request.

The problem when using such proxy (like HA Proxy, ProxySQL and MySQL Router) is that the server doesn’t really know from where the client is connecting. The server sees the IP address of the proxy/router as the source IP of the client.

HA Proxy initially designed the Proxy Protocol, a simple protocol that allows a TCP connection to transport proxy-related information between the client, the proxy server and the destination server. The main purpose of the Proxy Protocol is then to preserve the client’s original IP address (with some others metadata). See …

[Read more]
How to deploy a MySQL Database Service Instance with PHPMyAdmin

I recently received several messages from developers not being comfortable with command line when they need to create schemas, tables, … They were asking me for an easy alternative when testing MDS.

There is a very popular tool in the developer community to manage their databases in MySQL: PHPMyAdmin.

So if you are trying MDS (MySQL Database Service in Oracle Cloud Infrastructure), it’s possible to deploy such instance with a compute instance hosting PHPMyAdmin very easily using OCI’s Resource Manager and a stack (zip file) that you can find here: https://github.com/lefred/oci-phpmyadmin-mds/releases/tag/1.1.0

If you want to try MDS in OCI, you can get free credits using this url: …

[Read more]
Testing MySQL Database Service without VPN

Please note that this is not recommended for any production purpose, don’t expose MySQL traffic to the Internet !

MySQL Database Service is now available, take a look at this nice introduction video:

It is usually a very bad idea to expose a database on a public IP (MySQL or any other database ). MDS doesn’t allow you to implement such bad security practice.

The best way to use your MySQL instance is to use a VPN as I explained in this article.

However, this can be restrictive for a simple test. In this post I will illustrate how you can setup a MDS instance and test it without having to setup any kind of VPN. Of course I recommend you to use such practice only for testing …

[Read more]
From MySQL Group Replication to MySQL InnoDB Cluster

I wanted to be brave and I installed MySQL Group Replication manually…. it was painful !

Then I realized that managing those servers and especially deal with MySQL Routers was even more painful !

What are my options now ? Is there a solution or do I need to restart from scratch ?

Asking the answer is already answering it… and once again MySQL Shell at the rescue.

MySQL Group Replication

I’ve configured everything manually. I also loaded group_replication and clone plugins and finally after having bootstrapped my Group here is what I have:

mysql> select member_host, member_port port, member_state state, 
       member_role role, member_version version 
       from performance_schema.replication_group_members;
+-------------+------+--------+-----------+---------+
| member_host | port | state  | role      | version | …
[Read more]
Hiding instances on MySQL InnoDB Cluster/ReplicaSet

MySQL Router is a core component of InnoDB Cluster/ReplicaSet that enables the automatic routing of client traffic to the right instances of your database architecture. Router can automatically adapt to topology changes, however, there are some scenarios on which one would certainly benefit from having the possibility to tag an instance with a certain attribute that indicates a specific behavior change to Router’s default behavior.…

Facebook Twitter LinkedIn

MySQL 8.0 InnoDB Cluster with WordPress in OCI – part III

With this post we are reaching the end of our journey to HA for WordPress & MySQL 8.0 on OCI.

If you have not read the two previous articles, this is just the right time.

We started this trip using the MySQL InnoDB ReplicaSet where only 2 servers are sufficient but doesn’t provide automatic fail-over.

In this article we will upgrade our InnoDB ReplicaSet to …

[Read more]
MySQL 8.0 InnoDB ReplicaSet with WordPress in OCI – part II

This article is the second part of our journey to WordPress and MySQL 8.0 High Availability on OCI. The first part can be read here.

We ended part I with one webserver hosting WordPress. This WordPress was connecting locally to MySQL Router using HyperDB add-on. This add-on allows to split the reads & writes on MySQL Servers using replication. And finally we had one MySQL InnoDB ReplicaSet of two …

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