Presentation of some of the new features of MySQL 8.0.21 released on July 13th, 2020.
The post MySQL 8.0.21 New Features Summary first appeared on dasini.net - Diary of a MySQL expert.
Ideas, releases, practical guides, and perspectives from the people building with MySQL.
Presentation of some of the new features of MySQL 8.0.21 released on July 13th, 2020.
The post MySQL 8.0.21 New Features Summary first appeared on dasini.net - Diary of a MySQL expert.
PMM (Percona Monitoring and Management) is a great community tool for monitoring your OSDB (MySQL, PostgreSQL, MongoDB) fleet. It’s feature rich, and it’s built and distributed as open-source based on several de-facto industry standard tools such as Grafana and Prometheus. In the second half of last year, major version 2 was released and whereas the major components remained mostly the same, some significant architectural changes were made, but this is out-of-scope for this post.
Upgrading to PMM2 is basically the same as starting from scratch with a fresh install; it requires re-adding all your servers, which can be a painful process if you have a large fleet of instances. For servers where you have OS level access, you can just install the PMM2 agent, but for RDS there is no access to the OS so another approach is required. In this blog, I will focus on getting a large number of RDS instances added.
Adding RDS instances …
[Read more]Oftentimes, we need to replicate between Amazon Aurora and an external MySQL server. The idea is to start by taking a point-in-time copy of the dataset. Next, we can configure MySQL replication to roll it forward and keep the data up-to-date.
This process is documented by Amazon, however, it relies on the mysqldump method to create the initial copy of the data. If the dataset is in the high GB/TB range, this single-threaded method could take a very long time. Similarly, there are ways to improve the import phase (which can easily take 2x the time of the export).
Let’s explore some tricks to significantly improve the speed of this process.
Preparation Steps
The first step is to enable binary logs in Aurora. Go to the Cluster-level parameter group and make sure binlog_format …
[Read more]VIEWs have been a handy feature of MySQL for many years but do you know about the WITH CHECK OPTION clause? The WITH CHECK OPTION clause is used for a updatable views to prohibit the changes to those views that would produce rows which are not included in the defining query.
VIEW Definition Since a lot of SQL
novices read my blog, I'd like to start with the definition of a
view "Views are stored queries that when invoked produce a
result set. A view acts as a virtual table" according the
MySQL Manual.
SQL > CREATE VIEW
x_city AS
SELECT
Name,
…
So you need to build a new set of databases, perhaps in a new location or geographical zone and the business wants it done yesterday cause the newly launched product hit the front page of hacker news and your website … Continue reading →
Question: Hey, I got a UNIQUE INDEX, but I can store multiple rows with the same value, NULL. That is surprising. Is that a bug?
This is a rewrite of the same in German from 9 years ago.
root@localhost [kris]> create table t ( a integer, b integer, unique (a,b));
Query OK, 0 rows affected (0.09 sec)
root@localhost [kris]> insert into t values (1, 2);
Query OK, 1 row affected (0.01 sec)
root@localhost [kris]> insert into t values (1, 2);
ERROR 1062 (23000): Duplicate entry '1-2' for key 't.a'
This does not work, as expected. But this does:
root@localhost [kris]> truncate table t;
Query OK, 0 rows affected (0.16 sec)
root@localhost [kris]> insert into t values ( 1, NULL);
Query OK, 1 row affected (0.02 sec)
root@localhost [kris]> insert into t values ( 1, NULL);
Query OK, 1 row affected (0.03 …[Read more]
How does MySQL compare INTs with CHARs? I was asked this very question over the weekend and wanted to share that information plus some of the changes in MySQL 8.0.21 in this area. And yes those changes are pretty big.
Casting
Computers are good at making comparisons of two values but only if everything else the same. Comparing an integer with another integer is simple. Same data with same data type comparisons are a good thing. But what about when you need to compare a numeric 7 with a "7" where the number is in a string? In such cases one or both numbers need to be changed into the same basic data type. Imagine your favorite Harry Potter character waving their magic wand and shouting 'accio data' to change two different magical pieces of data into one common data type. No, Hogwarts was the the reason this conversion is called casting but this 'magic' needs …
[Read more]Owing to the success and feedback we received from our last training course, we will be running another 2 sessions, both for European, as we well as Pacific Time zones
Delivered by our Professional ProxySQL Trainers who have built and actively maintain ProxySQL.
ProxySQL was built in order to help build, support and improve MySQL infrastructure.
Our public 2x Day Training course will help you learn about how to use ProxySQL’s features effectively and to efficiently deal with real life events and emergency situations in your infrastructure.
The rich course content provides insights to help you build a strong understanding of the tool’s design goals, and most importantly… how to properly implement ProxySQL in order to maximize the resource utilization of your database cluster while avoiding common pitfalls and anti-patterns!
Immerse yourself in the world of ProxySQL with our two-day …
[Read more]Have you ever had to provision a large number of instances from a single backup? The most common use case is having to move to new hardware, but there are other scenarios as well. This kind of procedure can involve multiple backup/restore operations which can easily become a pain to administer. Let’s look at a potential way to make it easier using Percona Xtrabackup. The Percona XtraBackup tool provides a method of performing fast and reliable backups of your MySQL data while the system is running.
Leveraging Named Pipes
As per the Linux manual page, a FIFO special file (a named pipe) is similar to a pipe except that it is accessed as part of the filesystem. It can be opened by multiple processes for reading or writing.
For this …
[Read more]
Using the MySQL ALTER TABLE command, you can easily
change an existing columns’ name and datatype. With just a few
clicks, you can do the same in the phpMyAdmin visual web
interface. For many developers, this interface is the one they
lean on most while programming so it can’t hurt to know how to do
it yourself should you find yourself programming in this
environment…
Self-Promotion
If you enjoy the content written here, by all means, share this blog and your favorite post(s) with others who may benefit from or like it as well. Since coffee is my favorite drink, you can even buy me one if you would like!
Suppose we have a table with these 3 columns:
Our goal is to rename the title column to paper_title and to also change the datatype …
[Read more]