原文来自:http://www.clockwatchers.com/mysql_dump.html
MySQL Tutorial - Import or Export A Database
This tutorial section deals with mysqldump which is a tool to import and export MySQL databases.
It can be used to back up a database or to move database information from one server to another.
1. Export A MySQL Database
This example shows you how to export a database. It is a good idea to export your data often as a backup.
|
Replace username, password and database_name with your MySQL username, password and database name.
File FILE.sql now holds a backup of your database, download it to your computer.
2. Import A MySQL Database
Here, we import a database. Use this to restore data from a backup or to import from another MySQL server.
Start by uploading the FILE.sql file to the server where you will be running this command.
|
Replace the parts in red with your own information.
This powerful, easy to use command has many uses. Let's say you wanted to switch web hosting providers.
Simply export your data on the old provider's server and import it on your account with the new host.
###########################################################
本文介绍了如何使用mysqldump工具进行MySQL数据库的备份与恢复操作。详细演示了导出与导入数据库的具体命令,适用于数据库备份及迁移场景。
2095

被折叠的 条评论
为什么被折叠?



