17 Apr

Why a statement can be unsafe when it uses LIMIT clause?

MySQL 5.1 or newer can sometimes start throwing a strange message into an error log. The message states that a query was unsafe for binary logging along with some additional information. What does it mean? Is it a problem?

Read More
13 Apr

Choosing a MySQL package

As with any open source software, anyone can download MySQL sources, build binaries for some platforms and distribute their own packages. So we have the official ones from Oracle, MariaDB, and Percona - the makers of MySQL and its forks respectively. There are also those distributed with operating systems or that are available for install from their standard repositories. Some people or groups also create packages out of the most recent versions of various software and make them available to the world. Finally, some mash up a vanilla MySQL with various patches creating even more options. What to choose?

Read More
12 Apr

How to install and configure a Linux server for MySQL?

Have you ever spent a lot of time thinking about how to install and configure a Linux server for MySQL database? I will try to highlight all the critical steps and some of the decisions you may need to make.

Read More
10 Apr

How to check if MySQL has been swapped out?

How to check if any MySQL memory has been swapped out? This post explains it.

Read More
04 Apr

How to selectively kill queries in MySQL?

For as long as it is only about a few of them, it is as simple as looking at the SHOW PROCESSLIST output for thread identifiers to kill. They can be found in the first column called Id. These values can be passed to KILL thread_id command in MySQL. The problems appear with more complex scenarios. What if one needs to terminate all queries running longer than ten seconds? Doing copy&paste; repetitively could take a lot of time with twenty or so candidate threads. This can be done much more efficiently.

Read More