MySQL
As many of us know, the 5th annual MySQL Conference and Expo is happening April 20-23rd, 2009 in Santa Clara, California. The theme is Innovation Everywhere, and this year the conference organizers have taken an innovative page from OSCon and decided to host a free “camp” during the conference.
Slaves can be used for: horizontal read scalability, disaster recovery, consistent Backups. Be careful when using a slave for more than one purpose. Using a slave for more than one purpose can be done, but carefully. For example…
In this post I explain the different types of backup primers in MySQL and examine how the work.
Sometimes a client asks us to change the datatype of a column, but forgets to mention the schema name, and sometimes even the table name. As you can imagine, having this kind of information is vital to locate the object and perform the requested action. This kind of behaviour must be related to Murphy’s Law. In any case, I’d like to share with you a simple stored procedure that has helped us a lot in the past.
f you are using InnoDB Hot Backup and a recent version of mysqld (at least 5.0.67 or higher, including 5.1.30, though it may be later versions), your backup will run fine and output OK! at the end, as it should. Except for one thing. The binary log file and position do not appear in their rightful place. Here’s a snippet of the output from the backup…The bug is an artifact of the eventual deprecation of TYPE in favor of ENGINE. There’s no reason for ibbackup to continue to use TYPE; while the product works well, it is much more expensive than it warrants.
At the January 2009 Boston User Group I presented a session on the new partitioning feature in MySQL 5.1. I go through how to define partitions, how partitioning makes queries faster, the different types of partitioning and when to use each type, and the restrictions and limitations of partitioning. The slides and video are available here.
I had the chance to review the new Query Analyzer program from Sun over the last few days. I am very interested in how it performs as I have previously not had a chance to see the program in action (or the Enterprise Monitor program either for that matter). So, before getting into what the Query Analyzer can (and cannot) do let’s look at what Sun says it does.
One very helpful use of the technique Sheeri described in Remote connections without leaving the mysql shell is making sure that replication is working properly. According to the MySQL Reference Manual’s section on SHOW SLAVE STATUS Syntax, it shows information corresponding to the slave thread in the slave server. When replication is broken, however, or not working properly due to network issues between master and slave, this information may not be accurate. This has improved over recent releases, but it’s still not perfect. The question, then, is: how to be 100% sure (or as close as you can get to 100%) that replication is running fine? The answer, as offered by Sheeri: use CONNECT.
So, a colleague ran into issues booking the Santa Clara Hyatt Regency Hotel—apparently there were no rooms with 2 double beds left for the MySQL 2009 Conference and Expo.
You probably know that mysql -h host_or_ip can connect you to a remote host. But did you know that you can change the host you are connected to from within mysql? The undocumented (as far as I can tell, in the MySQL manual and in the “help” on the mysql command line) CONNECT statement can help.

Recent Comments