Home > Database > Mysql Tutorial > Can I Restore a MySQL Database from .frm, .MYD, and .MYI Files?

Can I Restore a MySQL Database from .frm, .MYD, and .MYI Files?

DDD
Release: 2024-12-13 01:16:09
Original
967 people have browsed it

Can I Restore a MySQL Database from .frm, .MYD, and .MYI Files?

Restoring MySQL Database from Physical Files

Question:

Can MySQL databases be restored from physical database files? Specifically, the following file types are available:

  • client.frm
  • client.MYD
  • client.MYI

The same file types exist for approximately 20 additional tables. Typically, mysqldump or similar tools are used to export databases into a single SQL file. How can these physical files be utilized for database restoration?

Answer:

A MySQL MyISAM table comprises three file types:

  • FRM: Table definition
  • MYD: Data storage
  • MYI: Index storage

To restore a database from these files:

  1. Ensure the MySQL server is offline.
  2. Copy the files into the database folder (usually /var/lib/mysql/ in Linux).
  3. Restart the MySQL server.

This process will restore the database from the provided physical files.

The above is the detailed content of Can I Restore a MySQL Database from .frm, .MYD, and .MYI Files?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template