Showing entries 1 to 10 of 149
10 Older Entries »
Displaying posts with tag: MySQL 8 (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]
MySQL 8 utf8mb4_0900_ai_ci collation confusion

Recently I was asked a question: Why am I getting utf8mb4_0900_ai_ci as the default collation in MySQL 8, despite setting the server to use utf8mb4_general_ci? With the upgrade to MySQL…

The post MySQL 8 utf8mb4_0900_ai_ci collation confusion first appeared on Change Is Inevitable.

SQL Calculations #1

This was principally written for my SQL students but I thought it might be useful to others. SQL calculation are performed row-by-row in the SELECT-list. In its simplest form without even touching a table, you can add two literal numbers like this:

SELECT 2 + 2 AS result;

It will display the result of the addition to the column alias result as a derived table, or the following result:

+--------+
| result |
+--------+
|      4 |
+--------+
1 row in set (0.00 sec)

Unfortunately, the use of literal values as shown above doesn’t really let you see how the calculation is made row-by-row because it only returns one row. You can rewrite the two literal values into one variable by using a Common Table Expressions (CTEs). The CTE creates an struct tuple with only one x element. Another way to describe what the CTE does would say, it creates a derived table named struct with a single …

[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]
SQL Statement Management

It’s very difficult explaining to students new to relational databases how SQL works. There are many parts that seem intuitive and then there are others that confuse and confound.

For beginners, the idea that a SQL statement is simply a text string that you must dispatch to a SQL statement processing engine is new. That’s because they use an Integrated Development Environment (IDE) that hides, or abstracts the complexity, of how SQL executes.

I start my core SQL class by demonstrating how to run a text literal query without a FROM clause in MySQL Workbench, like this:

SELECT 'Hello World!' AS "Output";

After writing the query, I highlight everything except the semicolon and click the lightening bolt that dispatches the static string to the SQL statement engine. They see this result:

Then, I launch a mysql Monitor session and write the query with a semicolon to dispatch the SQL …

[Read more]
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]
Showing entries 1 to 10 of 149
10 Older Entries »