Mysql – Very weird Innodb Corruption Issue

corruptioninnodbMySQLmysqldump

I'll try to keep this to the point.

System:
OPenVZ VPS, debian 6, 512 MB RAM, 50 GB HDD (25GB free)

I have a mysqldump dump file (3GB), that was created when the innodb database was working fine.

After purging, removing mysql and any related files/folders mariadb was installed (Actually this process has been repeated several times).
Next the dump file created earlier was imported (mysql -u user -p < sql.sql)

Immediately after importing the dump, I tried to take a backup using xtrabackup, it complained of corruption and crashed.

Output of check table tableName.

+------------------------------+-------+----------+---------------------------------------------------+
| Table                        | Op    | Msg_type | Msg_text                                          |
+------------------------------+-------+----------+---------------------------------------------------+
| db.table                     | check | Warning  | InnoDB: Index "product_id" is marked as corrupted |
| db.table                     | check | error    | Corrupt                                           |
+------------------------------+-------+----------+---------------------------------------------------+

Now comes the weird part. In The mysql-error log the page, the ascii page dump has strange sentences that should not be part of my VPS let alone the database or the table :

Part of the InnoDB: Page dump in ascii and hex (16384 bytes):

A fun three-picture set of the Okavango Delta in four sizes each  Okavango Jigsaw publish                                                      open                                                

                       3@ me      < l                Z  N    Z  N       Cute Puppies is a slider with 6 different pictures of super cute puppies. 3 pictures are easy, and 3 puppy pictures are a bit harder. Have fun!  Cute Puppies publish                                                      open              

The table in question has 3 columns – INT | INT | VARCHAR(50)

A cat trans.sql | grep "super cute puppies" confirmed that the unexpected sentences were not in my DB dump.

Anybody knows why my table is corrupt ? I have even tried to do a import from an older backup with similar results. And what about those strange sentences in the page dump ??

Lastly this all began after my VPS went offline for a couple of days (SSH brute force attacks, migration to new datacenter)

Thanks

Edit:
Before: Mysql 5.5 | After: 5.5.42-MariaDB

I thought Repair table was not for innodb..

btw can there be a unconfigurable limit to a mysql table size for the VPS ?

Edit: The unexpected sentences were part of a website that is also hosted by the same host. Found this after googling. Not sure what it means.

Best Answer

I've been having the exact same issues on my OpenVZ VPS's recently. Both running Debian 7 (official OpenVZ template), both with MySQL 5.6.23 from the Dotdeb repository. Random InnoDB corrupted tables, with the dump in the error log showing strange data that is definitely not part of any of my own databases, nor any files stored in my container.

Both started only recently (within the past month or so), one server was running fine for over a year prior, the other was a brand new VPS with fresh install of Debian.

My KVM VPS's running the exact same configurations have been fine thus far.

I'm sorry I can't offer a solution, but now I at least know that this is most likely not something that I caused. It has been extremely frustrating trying to figure out what is happening.

I'll let my host know that you have been having the exact same problems. Perhaps with this info they can figure out what the heck is going on. If they and I can get to the bottom of this I'll definitely let you know.