Restore MySQL database using source file method (applicable to virtual hosting and cloud hosting)

Published: 2011-03-16

Mysqldatabase migration has many methods. In summary, there are two. One is to use sql statements. This method is universal (http://www.west.cn/faq/list.asp?unid=875  ). The other is to use source files. The simplest and most convenient is undoubtedly to directly use database source files to restore, but the premise is that the database versions must be consistent; otherwise garbled characters will appear (4.0 and 5.0 versions are incompatible). Therefore, when restoring with source files, you must make clear the mysql version.

The database source file extensions are .MYD  .MYI  .frm Please note the file extensions.

Use ftp software to connect to the server (How to use ftp), upload the database source files to the databases directory (if the directory does not exist, create it in File Management)


2.jpg

After uploading, go to the hosting control panel and click "Restore mysql database from databases directory" to restore.

1.jpg

Cloud host: The method is the same. After uploading, just copy it to the corresponding database directory. The default path for mysql on Windows is d:\SOFT_PHP_PACKAGE\mysql\data. Note: copy to the directory with the corresponding database name. The default path on Linux is: /home/wddata/var