Skip to main content

Posts

Showing posts from December, 2012

Don't forget to check your partitions!

As it's the end of the year it might be time to check your partition definitions. If you forget to add a new partition in time partitions with no MAXVALUE might start to throw errors: mysql> create table nye (`event_id` int not null auto_increment,`edate` year(4) not null, description varchar(200),  -> primary key(`event_id`,`edate`))  -> partition by range( edate ) ( -> partition p2010 VALUES LESS THAN (2011),  -> partition p2011 VALUES LESS THAN (2012),  -> partition p2012 VALUES LESS THAN (2013) ); Query OK, 0 rows affected (0.04 sec) mysql> INSERT INTO nye(edate,description) VALUES('2010','twenty ten');  Query OK, 1 row affected (0.00 sec) mysql> INSERT INTO nye(edate,description) VALUES('2011','twenty eleven'); Query OK, 1 row affected (0.00 sec) mysql> INSERT INTO nye(edate,description) VALUES('2012','twenty twelve'); Query OK, 1 row affected (0.00 sec) mysql> INSE...

A difficult XtraBackup restore

There was one MySQL server with a Adaptec Raid controller and 4 disks. One of the disks was having media errors and caused the whole SCSI bus to become unavailable. This resulted in a corrupted InnoDB table. Luckily we did have backups. A full backup and incrementals. So to restore the backups I installed XtraBackup and MySQL 5.5 on another server. Then the first step was to 'prepare' the backup. This worked okay for the full backup (redo only). The second step to add the incremantals failed for the first incremental. This was easily resolved by specifying the full paths instead of relative paths. Then the backup was fully prepared using the redo logs and undo logs. As XtraBackup doesn't backup your my.cnf we copied the my.cnf from another server and adjusted it for this server. The my.cnf in your backup only contains everything needed for a restore, and some of those settings are Percona Server specific and will result in an error when used with MySQL. So f...

MySQL Zeroday's

SANS ISC reported a number of zeroday's for MySQL today. * CVE-2012-5611 MySQL (Linux) Stack based buffer overrun PoC Zeroday http://seclists.org/fulldisclosure/2012/Dec/4 https://bugzilla.redhat.com/show_bug.cgi?id=882599 * CVE-2012-5612 MySQL (Linux) Heap Based Overrun PoC Zeroday http://seclists.org/fulldisclosure/2012/Dec/5 https://bugzilla.redhat.com/show_bug.cgi?id=882600 * CVE-2012-5613 MySQL (Linux) Database Privilege Elevation Zeroday Exploit http://seclists.org/fulldisclosure/2012/Dec/6 https://bugzilla.redhat.com/show_bug.cgi?id=882606 * CVE-2012-5614 MySQL Denial of Service Zeroday PoC http://seclists.org/fulldisclosure/2012/Dec/7 https://bugzilla.redhat.com/show_bug.cgi?id=882607 * CVE-2012-5615 MySQL Remote Preauth User Enumeration Zeroday http://seclists.org/fulldisclosure/2012/Dec/9 https://bugzilla.redhat.com/show_bug.cgi?id=882608   Source: http://seclists.org/oss-sec/2012/q4/387