RDS Migration from 5.5 to 5.6 with mysqldump

Amazon recently announced support for 5.6, unfortunately, direct upgrade from lower versions is not yet supported. On a recent migration work – running mysqldump flat out would’ve meant 6+hrs of downtime. How did we cut it off to 1h45m? Simple, run dump per table and pipe it directly to the new 5.6 instance in parallel …

Continue reading

Limit The Size of Your Core Files on Linux

So we all know that when troubleshooting MySQL crashes or any other processes in that regard, we simply enable core files to be dumped when the appropriate signal it triggered. To get the best results, we’d set the core file size limit everywhere to unlimited and be done with it, but what if you want …

Continue reading

Default RDS Account Privileges

I was searching looking for the PRIVILEGES that comes with the primary MySQL account on RDS, but it looks like this is not documented anywhere nor blogged about yet. So for the sake of other users, here it is: GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY …

Continue reading

Zend_Paginator Without Adapter Data

If you simply want to take advantage of Zend_Paginators page generation function without feeding it actual data, how do you do it? Simple, implement Zend_Paginator_Adapter_Interface in your custom class and override three functions like below: <?php class Dotmanila_Paginator_Adapter_Null implements Zend_Paginator_Adapter_Interface { private $_count = 0; public function __construct(array $data) { if(isset($data['count']) AND $data['count'] > 0) …

Continue reading

Optimizing MIN and MAX MySQL Functions

MySQL can optimize aggregate functions like MIN and MAX as long as the columns specified are indexed. This means that, in the case of MIN and MAX, the optimizer should be able to identify the highest and lowest values of an indexed column from the B-Tree index. Say I have a table like below: CREATE …

Continue reading

Pacemaker Failed Actions ‘not installed’ And ‘not configured’

Playing around with Percona Replication Manager, and being new to Pacemaker, some errors were somewhat cryptic. May 26 09:53:39 [2181] ha01.localdomain    pengine:   notice: unpack_rsc_op:    Preventing p_mysql from re-starting on ha02.localdomain: operation monitor failed 'not installed' (rc=5) May 26 09:53:39 [2181] ha01.localdomain    pengine:   notice: unpack_rsc_op:    Preventing op from re-starting on ha02.localdomain: operation monitor failed 'not installed' …

Continue reading

MySQL Backups, The Tools So Far

Backups is one of the most important part of any MySQL deployment, and nowadays, there’s a number of tools to choose from depending on how your organization implements them. The purpose of this post is to enumerate the main tools and some helpers that makes backing up and testing/restoring your backups more convenient. By all …

Continue reading

Reduce Stack Frame Depth from XDebug Trace Output

Earlier, I’ve written about how to dump code trace from your PHP application using XDebug, however, more often that not, you get lengthy results and you simply want to get an overview up to certain depth. I’ve created a simple PHP for that which you can find here. It’s fairly easy to use, simply feed …

Continue reading

Check (Rough) Progress of Your CSV Import to MySQL

If you are importing large CSV or SQL dumps to MySQL, chances are you were looking for ways to see how far the import has gone. If you know how many rows there are from the file being imported, you can do a SELECT COUNT(*) but that would take sometime for the query to finish …

Continue reading