随着数据的增多,数据的备份显得日益重要,下面是mysql常用的数据导入导出命令。
1.导出整个数据库

格式:mysqldump -u 用户名 -p 数据库名 > 导出的文件名
举例:
C:Documents and SettingsOwner>mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 5 to server version: 5.0.7-beta-nt

(更多…)