slider

Author: Aleksandr Kuzminsky

Resolving ERROR 1050 42S01 At Line 1 Table Already Exists

When ALTER TABLE crashes the MySQL server, it leaves orphaned records in the InnoDB dictionary. It is annoying because next time you run the same ALTER TABLE query, it will fail with error:

This post explains why it happens and how to fix it. When you run ALTER table, InnoDB follows the plan: Block […]

Read More

Recover Table Structure From InnoDB Dictionary

When a table gets dropped, MySQL removes the respective .frm file. This post explains how to recover the table structure if the table was dropped. You need the table structure to recover a dropped table from the InnoDB tablespace. The B+tree structure of the InnoDB index doesn’t contain any information about field types. MySQL needs […]

Read More

Repair Corrupted InnoDB Tables With Secondary Index Corruption

UPDATE: We announced online data recovery from corrupt databases. Check it out on https://recovery.twindb.com/ UPDATE (01/01/2017): We stopped further development of undrop-for-innodb and don’t support its open source versions anymore. InnoDB provides no means to repair corrupted table space. Once a table got corrupted, the only way to repair MySQL files is to start it […]

Read More

Setting Up Authentication En Masse

Managing many hosts is a quite challenging task. There are many tools to solve the problem. My favorite is pdsh. Running a command across a set of hosts is as simple as following:

Together with dshbak (which is a part of pdsh package) you can do even cooler things. Like, check which systems have […]

Read More

InnoDB Dictionary

Why Does InnoDB Need A Dictionary An InnoDB dictionary is a set of internal tables InnoDB uses to maintain various information about user tables. It serves as API between a human and the database. While the humans refer to tables by their names, InnoDB works with integer identifiers. The dictionary stores correspondence between table name […]

Read More

A Real Example Of Nagios Monitoring

It’s now time to setup proper monitoring to avoid unpleasant surprises in future. There are two major problems the monitoring solves: alerting and trending. Alerting is to notify the person in charge about a major event like service failing to work. Trending is to track the change of something over time – disk or memory […]

Read More