Our site fell and the hoster provided these files for recovery.

What data, besides the mentioned files, will be required for recovery?

    1 answer 1

    What data, besides the mentioned files, will be required for recovery?

    If all the tables were stored in your database using only the myisam engine, then the following files, in theory, should be enough :

    Each MyISAM table is stored on disk in three files. The file type. An .frm file stores the table format. The data file has an .MYD (MYData) extension. The index file has an .MYI (MYIndex) extension.

    unless the db.opt file db.opt required with the global settings for the database (such as the default character set, etc.).


    All of these files are stored in a directory that bears the name of the database (it is usually located in the directory with the data mysqld : often it is /var/lib/mysql ). here is the full content of this directory (named after your database) and you will need it.

    Copy this directory into the directory with the mysqld data (setting the directory and files with the rights and ownership as in "neighboring" databases) and restart mysqld - the server should then "pick up" the new database (it should be visible in the list issued by the show databases command ).


    if at least one table used the innodb engine, which is now quite popular, then the situation is somewhat more complicated. the description of the table, of course, was stored in the database directory in the file table имя-таблицы.frm . while the tables themselves could be stored in significantly different places:

    • if the global configuration variable on the old server innodb_file_per_table had the value off , then the data of all tables from all the databases were stored in one file, and the hoster is unlikely to provide it to you.
    • if this global variable was set to on , then the data for each innodb table was stored in files table name.ibd inside the directory with your database.