Question

Two days ago I have installed RoundCube mail script working on:

PHP

Name        : php
Arch        : x86_64
Version     : 5.3.18
Release     : 1.el6.remi

MySQL

Name        : mysql
Arch        : x86_64
Version     : 5.5.28
Release     : 1.el6.remi

Anything worked just great till today morning, script refers that Round Cube database has problems. How wonder was I am looking at directory:

/var/lib/mysql/roundcubemail

There is only frm files, no any .myd or .myi

cache.frm
cache_index.frm
cache_messages.frm
cache_thread.frm
contactgroupmembers.frm
contactgroups.frm
contacts.frm
db.opt
dictionary.frm
identities.frm
searches.frm
session.frm
users.frm

My server has 12 databases and now only Round Cube db missing .myd .myi files. Re-install this script is not a problem but I am interesting to figure out what was happened to this database and to be sure that it will not going to happen again.

MySQL error log has only this information:

121117  7:38:06 [ERROR] Cannot find or open table roundcubemail/session from
the internal data dictionary of InnoDB though the .frm file for the
table exists. Maybe you have deleted and recreated InnoDB data
files but have forgotten to delete the corresponding .frm files
of InnoDB tables, or you have moved .frm files to another database?
or, the table contains indexes that this version of the engine
doesn't support.
See http://dev.mysql.com/doc/refman/5.5/en/innodb-troubleshooting.html
how you can resolve the problem.

My question is: Is there any other methods to track this situation and find the reason that database just had disappeared?

Was it helpful?

Solution

.myd and .myi files only exist for MyISAM tables.

If you followed the standard Roudcube installation procedure (verified with v0.8.4), tables were set to use the InnoDB storage engine.

Have you messed with any file under /var/lib/mysql/ ? By default, InnoDB tables are stored in one single file, probably /var/lib/mysql/ibdata1 in your case. If not, look for the innodb_data_file_path directive in your my.cnf configuration file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top