In the previous article I've intentionally
skipped the topic related to Binlog impact on MySQL 8.0
Performance, because it's not a short story, nor a simple
one..
In fact, for most of people Binlog in MySQL is generally
representing and additional overhead, and historically it was
true. Since MySQL 5.6 there is Binlog Group Commit (BGC) feature
available, and it was rather doing well, decreasing the gap between "binlog=OFF" and
"binlog=ON sync_bin=1". However, storage vendors are making flash
drives more and more better from year to year.. And when we
delivered MySQL 5.7 the scope of Binlog impact moved with code
and flash improvements -- the main impact was no more coming from
the I/O operations …
Sometimes you want to reduce disk usage on certain servers by adjusting the time that binary logs are kept. Also, some installations of MySQL and MariaDB have suffered from a very-hard-to-catch bug where the binary logs end up not getting automatically expired (basically, the expire_logs_days option doesn’t always work effectively).
A workaround can be scripted, but typically the script would specify the exact datetime to which the logs need to be kept. The reference manual and examples all do this too, quite explicitly, noting:
The datetime expression is in the format ‘YYYY-MM-DD hh:mm:ss’.
However, the actual command syntax is phrased as follows:
PURGE { BINARY | MASTER } LOGS { TO ‘log_name’ | BEFORE datetime_expr }
and that indicates much more flexibility in the parser: “datetime_expr” means that you …
[Read more]In this blog post, we’ll look at how to turn on binlog encryption in Percona Server for MySQL.
Why do I need this?
As you probably know, Percona Server for MySQL’s binlog contains sensitive information. Replication uses the binlog to copy events between servers. They contain all the information from one server so that it can be applied on another. In other words, if somebody has access to a binlog, it means they have access to all the data in the server. Moreover, said person (or, “Hacker”) could create a clone copy of our server by just making a replica of it. In the end, they have access to our binlog. This shows how important protecting a binlog really is – leakage of binlogs not only make a particular table/tablespace or a group of tables accessible to a hacker, but literally the whole server …
[Read more]
Starting with MySQL 5.7 we introduced the Query Rewrite Plugin.
That tool is really useful for changing queries. Of course the
best location to modify the query is the source code of the
application, but this is not always possible. Either the
application is not under your control or queries are generated
from a framework like Hibernate and sometimes it is hard to
change the query generation.
If you are interested in details about the Query Rewrite Plugin,
I recommend this blogpost from the MySQL
Engineering: http://mysqlserverteam.com/the-query-rewrite-plugins/
Recently I was asked how this works in replication environments.
Which query goes into the binlog?
If you are using the Rewriter plugin that comes with MySQL 5.7,
the answer is easy: This plugin only supports rewriting SELECT
queries. SELECT queries don't get into the binlog …
Swanhart-Tools includes FlexCDC, a change data capture tool for MySQL. FlexCDC follows a server’s binary log and usually writes “changelogs” that track the changes to tables in the database. I say usually because the latest version of Swanhart-Tools (only in github for now) supports FlexCDC plugins, which allow you to send the updates to a remote data source, or to any other place of your liking. You can find out more about FlexCDC basics in a previous blog post.
Please note that FlexCDC still needs to have source and destination instances defined in the configuration, even when using plugins. This is because the FlexCDC state (how much into …
[Read more]Swanhart-Tools includes FlexCDC, a change data capture tool for MySQL. FlexCDC follows a server’s binary log and usually writes “changelogs” that track the changes to tables in the database. I say usually because the latest version of Swanhart-Tools (only in github for now) supports FlexCDC plugins, which allow you to send the updates to a remote data source, or to any other place of your liking. You can find out more about FlexCDC basics in a previous blog post.
Please note that FlexCDC still needs to have source and destination instances defined in the configuration, even when using plugins. This is because the FlexCDC state (how much into which …
[Read more]Jean-François talks about binlog servers. Take a look here: http://blog.booking.com/mysql_slave_scaling_and_more.html
Starting in version 5.7.3 MySQL added SSL support to
mysqlbinlog client program. This feature allows system
administrators to perform remote binlog queries (using
--read-from-remote-server option) over secure
connections.
So, the behavior of mysqlbinlog client program using SSL
options is now the same as other MySQL client tools, with same
SSL options and same SSL defaults. See the References section if you want more information
about MySQL SSL options.
Overview
The remote administration of MySQL servers is a very common task
as many MySQL servers are deployed in remote hosting facilities
or in remotely located data centers.
There are many problems with remote administration of servers.
With respect to security, the major concerns are:
- If the traffic between the administrative console and the remote server passes …
Send to Kindle
Recentemente respondi algumas questões referente a lag(atraso) na replicação, o que percebi é que muita gente não intende corretamente como este processo funciona internamente no MySQL e o porque do lag acontecer:
- MySQL replication: most important config parameters for performance on slave server?
- mysql replication delay very serious
Veja a figura abaixo, ela representa replicação assíncrona no MySQL, recomendo que você leia meu outro post sobre o assunto:
…
[Read more]Send to Kindle
These days I’ve answer some questions about replication lag, and I realized that most of people does not correctly understand how this process works internally on MySQL, and why does delays happen:
- MySQL replication: most important config parameters for performance on slave server?
- mysql replication delay very serious
See the bellow image, it represents asynchronous replication on MySQL, I highly recommend you to read my other post:
…
[Read more]