Showing entries 1 to 10 of 94
10 Older Entries »
Displaying posts with tag: InnoDB Cluster (reset)
MySQL Router bootstrap & “conf-set-option”

I thought I’d share a quick addition to the MySQL Router bootstrap command and hope it helps others, as always.

First of all, you all know the MySQL Router documentation, and have probably looked into a specific option when executing commands, but I’ve found one quite handy that allows me to add in certain parametrization for my routers: –conf-set-option

It’s simple to use, so I’ll just share what I used as a reference and let you play away.

mysqlrouter --bootstrap icadmin:'MyP4ssword!'@node01:3306 \
--name="router_node1" --account=routerAdmin \
--conf-base-port=3306 --report-host=rtnode01 --conf-use-gr-notifications \ …
[Read more]
Some MySQL Router 8.4.3 read-write splitting quips

So, as you’ve noticed, I’ve been playing around with MySQL Router v8.4.3 and read-write splitting, and now I’ve come across some issues that my environment has generated and I’ve opened some bugs against the fiend:

Bug 116950 – Router Read-Write splitting config causes PHP RSET_HEADER error

Bug 116951 – mysqlrouter Error parsing stats_updates_frequency errors

Bug 116952 – Router w/ RW split causes ERROR: 4501 if sql script contains comments lines (“– “)

(Yup, I prepared each bug description, repeatable tasks and suggested fix …

[Read more]
Enabling Read-Write splitting for automatic query distribution – all with MySQL Router

I’m just trying out the v8.4 Read-Write configuration for MySQL Router, that comes default in the community edition and, as they say, TL;DR “it’s default upon bootstrap”.

What does this mean and how can I go about it?

The overview is simple:

  • Either install or upgrade your existing MySQL Router to v8.4 at least.
  • Bootstrap the Router.
  • Use the port 3310 or change it to fit your needs.

Let’s get to it:

Stop your running router:

systemctl stop mysqlrouter

Copy the old config, just in case:

cp /etc/mysqlrouter/mysqlrouter.conf /etc/mysqlrouter/mysqlrouter_v80.conf

I normally keep my mysql linux repository disabled so no “yum update” takes over version control and gives me a nasty surprise afterwards. As so, I uncomment the “mysql” entry:

vi /etc/yum.conf …
[Read more]
Dolphie – “Rerecord not fadeaway”

After installing & configuring Dolphie, let’s take a look into how we can “re-record not fadeaway” and avoid using a VHS tape.

One of the coolest features is being able to go back in time with Dolphie and analyze what was happening at a specific moment.

This feature requires recording so we can replay.

Setting Dolphie up for recording mode.

I’m really just going to share the links to the the github site and organize my steps so someone else might want to rinse’n’repeat or “replay”. I’m just a mere messenger.

It works via the Daemon mode. …

[Read more]
Using Dolphie for MySQL focus monitoring & performance tuning.

I have been looking into “dolphie” lately, and have to say, “thanks Charles!”. I actually first saw dolphie via Lefred’s MySQL Belgian Days and installed it just after looking into the slidedeck. But never got around to looking further… until now.

We can use so many different observability (o11y?) tools to get notifications, alerts, react, generate reports, etc. from so many different companies, using agents, proxies, repositories, and so on and so forth. And after exchanging experiences with dolphie’s author himself, Charles, the idea here is to go that little bit further in …

[Read more]
Some InnoDB Cluster troubleshooting commands

Different ways to get the status:

mysqlsh --login-path=icadmin -h$MYROUTER1 -- cluster status

mysqlsh --login-path=icadmin -h${HOSTNAME} --redirect-primary -- cluster status

mysqlsh icadmin:'P4ssw0rD'@db01:3306 -- cluster status --extended=0

mysqlsh icadmin@$MYROUTER1:3306 -- cluster status --extended=1

watch -n 5 “mysqlsh --login-path=icadmin -h$MYROUTER1 -- cluster status”

Set the Primary Instance (switching):

mysqlsh --login-path=icadmin -h${HOSTNAME} --redirect-primary -- cluster set_primary_instance "db01"

Obtaining MySQL InnoDB Cluster basics:

select cluster_id, cluster_name, description, cluster_type, primary_mode, clusterset_id from mysql_innodb_cluster_metadata.clusters;

Members of our cluster:

select * from performance_schema.replication_group_members order by MEMBER_ROLE;

Local & Remote Trans Q’s:

[Read more]
Jemalloc install & config for MySQL

So, we’ve heard that jemalloc is better than malloc for MySQL usage, and in fact, certain versions / forks of mysql already include this, eg. Percona Server (https://github.com/percona/jemalloc).

But, how can I install and configure my system to use it?

Here’s a quick push in the, hopefully, right direction.

First things first, what is “jemalloc” and how does it affect my system? I think it’s quite well explained here: https://www.percona.com/blog/impact-of-memory-allocators-on-mysql-performance/ albeit an old article.

The right place to get the latest …

[Read more]
How Network Splits/Partitions Impact Group Replication in MySQL

In this blog post, we will explore how network partitions impact group replication and the way it detects and responds to failures. In case you haven’t checked out my previous blog post about group replication recovery strategies, please have a look at them for some insight. Topology: [crayon-67ea053666a7c663919036/] Scenario 1: One of the GR nodes […]

MySQL Inside: Using the PS error_log table for a quick peak!

Just thought I’d share a script I use daily and helps me redirect my attention if needed.

This is but a mere pointer, guideline and starting point in any task. I just thought I’d share and hope someone else’s day becomes slightly easier thanks to some brief investigation and command tweaking.

Now the really handy thing here is that I only hard code the router01 node name, as I’m using that as a potential endpoint (thinking cloud, XaaS, etc…) where it could also be a VIP, LBR or similar. It’s the entry point so I can query the P_S table error_log so I can get different views and act accordingly.

For example:

  • First, give me the InnoDB Cluster ordered server list so I can take a step back from my usual pains and worries, and see the architecture view. And make me type “Y” or similar to move on. Here if there were any server missing, I’d see the summary right away so I don’t really need to …
[Read more]
MySQL Router quick’n’simple troubleshooting

I thought I’d share some quick intro steps into how we can monitor the MySQL Router.

This can be useful if we’re observing intermittent outages, network packet drops or you’re just not sure if everythings fine in your MySQL InnoDB Cluster.

My scenario: The drupal servers are connecting and sometimes the users are getting connection errors. I don’0t see anything at MySQL server level of any instance nor cluster problem. Let’s review the Routers.

On all MySQL Router servers, double check the config file for the log location and also the log level. At /etc/mysqlrouter/mysqlrouter.conf (default rpm install location):

[DEFAULT]
name=myrouter
user=mysqlrouter
..
..
logging_folder=/routerlog/log
..
[logger]
level=DEBUG
#level=INFO

I’ve changed my logger level to DEBUG which will give you a lot more info about connections and counters so you can see what’s happening …

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