Recently, I was puzzled by MySQL replication ! Some weird, but completely documented, behavior of replication had me scratching my head for hours. I am sharing this war story so you can avoid losing time like me (and also maybe avoid corrupting your data when restoring a backup). The exact justification will come in a follow-up post, so you can also scratch your head trying
MySQL obviously got many things right, otherwise, it would not be the World’s Most Popular Open Source Database (according to DB-Engines). Sometimes, however, I run into some decisions or behaviors which are just plain bad designs. Many such designs have a lot of historical reasoning behind them and maybe they are still here because not enough resources are allocated to cleaning up technical debt.
I’m passionate about observability, especially when it comes to understanding system performance. One of the most important pieces of data to understand MySQL Performance is understanding its latches contention (mutexes, rwlocks, etc).
The “best” way to understand latches in MySQL is Performance Schema. Unfortunately latching profiling is disabled by default in Performance Schema because it causes quite a significant overhead; significant enough you likely will not be …
[Read more]Percona Monitoring and Management (PMM) has been on the road for a while now, and it brings exciting new features and improvements. For those who are not familiar with the tool, PMM allows deep insight into the performance of applications and databases. The most crucial highlight: it is 100% open-source. Also, the source code is present on GitHub.
Back to new features and improvements. One of them, that customers were requesting, was the support for LDAP. This feature finally arrived with PMM version 2 thanks to the new version of Grafana, and I intend to demonstrate in …
[Read more]Throughout this tutorial for beginners you'll learn to use Laravel 6 - the latest version of one of the most popular PHP frameworks - to create a CRUD web application with a MySQL database and Bootstrap 4 styles from scratch and step by step starting with the installation of Composer (PHP package manager) to implementing and serving your application.
Note: Laravel 6 is recently released and this tutorial is upgraded to the latest version.
What is Bootstrap 4?
Bootstrap 4 is the latest version of Twitter Bootstrap which is a CSS framework that allows web developers to professionally style their web interfaces without being experts in CSS.
Bootstrap 4 is based on Flexbox and allows you to build responsive layouts with easy classes and utilities.
What is CRUD?
CRUD stands for Create, Read, Update and Delete which are operations needed in most data-driven apps that access and work with data from a …
[Read more]Debezium has packed with monitoring metrics as well. We just need to consume and expose it to the Prometheus. A lot of use of useful metrics are available in Debezium. But unfortunately, we didn’t find any Grafana dashboards to visualizing the Debezium metrics. So we built a dashboard and share it with the Debezium community. Still, a few things need to improve, but almost all the metrics are covered in one single dashboard.
Debezium MySQL monitoring metrics:
Debezium MySQL connector has three types of metrics.
- Schema History — Track the schema level changes.
- Snapshot — Track the progress about the snapshot.
- Binlog — Real-time reading binlog events.
Setup Monitoring for MySQL connector:
We need to install JMX exporter for monitoring the debezium MySQL connector. We have already blogged about this with detailed steps.
…
[Read more]The Case
Securing MySQL is always a challenge. There are general best practices that can be followed for securing your installation, but the more complex setup you have the more likely you are to face some issues which can be difficult to troubleshoot.
We’ve recently been working on a case (thanks Alok Pathak and Janos Ruszo for their major contribution to this case) where MySQL started becoming unavailable when threads activity was high, going beyond a threshold, but not always the same one.
During that time there were many logs like the following, and mysqld was becoming unresponsive for a few seconds.
2019-11-27T10:26:03.476282Z 7736563 [Note] Got an error writing communication packets 2019-11-27T10:26:03.476305Z 7736564 [Note] Got an error writing …[Read more]
At re:Invent in Las Vegas in December 2019, AWS announced the public preview of RDS Proxy, a fully managed database proxy that sits between your application and RDS. The new service offers to “share established database connections, improving database efficiency and application scalability”.
But one of the benefits that caught my eye is the ability to reduce the downtime in case of an instance failure and a failover. As for the announcement:
In case of a failure, RDS Proxy automatically connects to a standby database instance while preserving connections from your application and reduces failover times for RDS and Aurora multi-AZ databases by up to 66%”
You can read more about the announcement and the new service on the AWS …
[Read more]A database proxy is a wonderful tool that is able to provide significant functionality across various use cases. For example, a seamless master role switch to another node for maintenance; transparency with read and write connections; or providing automatic, intelligent database load balancing.
In the MySQL world, these proxies provide a single entry point into MySQL databases for the calling client applications. Or put differently, the proxy is a middle layer sitting between a MySQL database and an application. The application connects to a proxy, which then forwards connections into the database.
Good proxies make MySQL database clusters appear like single databases by hiding the “behind-the-scenes-plumbing” from the application. One …
[Read more]What a great way to start the New Year! I woke up this morning to find in the news that MySQL won the DBMS of the year award for 2019.
“MySQL is the database management system that
gained more popularity in our DB-Engines
Ranking within the last year than any of the other 350
monitored systems.
We thus declare MySQL as
the DBMS of the Year 2019”, says
DB-Engine.
Getting the highest popularity gain among over 350 monitored systems is really impressive but this could only happen because of you, the users of MySQL. Thank you all for your ongoing support and your feedback to help us continue to make MySQL always better.
As for the method used for determining the winner every year, DB-Engine explained it …
[Read more]Starting with Percona Server for MySQL 8.0.17, Percona Server ships with a data masking plugin, using the same API as the MySQL Enterprise Masking and De-identification feature. This plugin was developed by Francisco Miguel Biete and was submitted to Percona Server as a community contribution. He also wrote an excellent post describing his contribution for Percona’s Community Blog titled Percona Server for MySQL 8.0 – New Data Masking Feature and the full list of functions can be found in the documentation of the MySQL Enterprise plugin. …
[Read more]