This is a follow-up post in the MySQL Master Replication Crash Safety series. In the two previous posts, we explored the consequence of reducing durability on masters (including setting sync_binlog to a value different than 1) when slaves are using legacy file+position replication. In this post, we cover GTID replication. This introduces a new inconsistency scenario with a potential
We recently had to drop a column in production, from a relatively large (order of 10⁷ records) table.
On modern MySQL setups, dropping a column doesn’t lock the table (it does, actually, but for a relatively short time), however, we wanted to improve a very typical Rails migration scenario in a few ways:
- offloading the column dropping time from the deploy;
- ensuring that in the time between the column is dropped and the app servers restarted, the app doesn’t raise errors due to the expectation that the column is present;
- not overloading the database with I/O.
I’ll give the Gh-ost tool a brief introduction, and show how to fulfill the above requirements in a simple way, by using this tool and an ActiveRecord flag.
This workflow can be applied to almost any table alteration scenario.
Contents:
- …
Want to deploy WordPress 5.0 on the Now platform by ZEIT? Our friends over at ZEIT’s Now global serverless deployment platform whipped up a great tutorial for WordPress5-on-Now using cheap MySQL hosting instances from ScaleGrid. With such strong interest in this installation, we decided to write up the steps to configure your MySQL database on the ScaleGrid side to get you up and running ever faster with WordPress on Now.
Leave your comments: https://t.co/exuBzSHkHM
@now/wordpress summary:
◆ λ size = 13mb
◆ Just needs `wp-config.php`
◆ All static assets output directly to CDN …
In one of my previous posts, I started a series on data compression options with MySQL. The first post focused on the more traditional compression options like InnoDB Barracuda page compression and MyISAM packing. With this second part, I’ll discuss a newer compression option, InnoDB transparent page compression with punch holes available since 5.7. First, I’ll describe the transparent page compression method and how it works. Then I’ll present similar results as in the first post.
InnoDB transparent page compression
Before we can discuss transparent page compression, we must understand how InnoDB accesses its data pages. To access an InnoDB page, you need to know the tablespace (the file) and the offset of the page within the …
[Read more]Recently I received several questions about rotating log files for ProxySQL, so I decided to draft it up as a blog post. Let me go by this using an example.
In my testing lab, I have set up a fairly default ProxySQL (version 1.4.13) service. The default location for the proxysql.log is in /var/lib/proxysql.
[root@proxysql ~]# ls -hal /var/lib/proxysql/proxysql.log* -rw-------. 1 root root 4.9K Jan 30 18:47 /var/lib/proxysql/proxysql.log
I created a pretty basic default logrotate configuration to ensure my logfile rotates on a daily basis and five rotations are kept before expiring.
[root@proxysql ~]# cat /etc/logrotate.d/proxysql
/var/lib/proxysql/proxysql.log {
missingok
daily
notifempty
compress
create 0600 root root
rotate 5
}
First attempt
Let’s check whether this is actually the correct file that is used that we will be rotating. As it turned out it is!
[root@proxysql ~]# lsof | …[Read more]
When things go horrible wrong and a process crashes, one of the most powerful things to investigate the cause of the crash is a core dump. As the amount of memory allocated to processes such as MySQL has increased – in some cases approaching 1TiB of memory – enabling core dumps can cause problems of their own. MySQL Server 8.0.14 and later supports an option to reduce the size of the core dump which will be discussed in this blog.
Typically the largest single user of memory for MySQL is the InnoDB buffer pool. This is used to cache the data and indexes for tables using the InnoDB storage engine (the default). It is rarely important to know what is stored in the InnoDB buffer pool when investigating a crash, so a good way to …
[Read more]The latest release of the MySQL Shell 8.0.14 (GA) improved the JSON import utility to support the conversion of more BSON data types from the strict mode representation of MongoDB Extended JSON. This removes a previous limitation regarding the import of more complex MongoDB data types to MySQL, making it more reliable.…
Facebook Twitter Google+ LinkedIn
In my recent post about the Left-Prefix Index Rule, I explained how queries can use all or part of a compound (multi-column) index. Knowing what makes an index fully usable by a query is important, but it's also important to know how to figure out how much of an index a query is able to use. In this article I'll show you how to do this by reading the query's explain plan. This article covers MySQL, Postgres, and MongoDB.
As a quick review, a query can use an index if it has filtering values that constrain a contiguous leading portion of the index, up to and including the first inequality condition in index-column order. Now let's see where the database server exposes how much of the index is used.
MySQL
In MySQL's …
[Read more]ProxySQL 1.4.14, released by ProxySQL, is now available for download in the Percona Repository along with an updated version of Percona’s proxysql-admin tool.
ProxySQL is a high-performance proxy, currently for MySQL, and database servers in the MySQL ecosystem (like Percona Server for MySQL and MariaDB). It acts as an intermediary for client requests seeking resources from the database. René Cannaò created ProxySQL for DBAs as a means of solving complex replication topology issues.
The ProxySQL 1.4.14 source and binary packages available from the …
[Read more]This event was just awesome. We got 110 participants ! Thank you everybody and also a big thank to the speakers.
Here are the slides of all the sessions:
- MySQL Shell – A DevOps-engineer day with MySQL’s development and administration tool, Miguel Araújo
- MySQL Shell : the best DBA tool ? – How to use the MySQL Shell as a framework for DBAs, Frédéric Descamps
- Tuning MySQL 8.0 InnoDB for High Load, Dimitri Kravtchuk
- …