mysql数据库数据备份与恢复
2017-05-07 13:34
573 查看
备份数据:
恢复数据:
使用load data方法
使用mysqlimport方法
C:\Users\Administrator>mysqldump -uroot --password -v test01 test02 >e:\temp\20170507\a3.sql Enter password: **** -- Connecting to localhost... -- Retrieving table structure for table test02... -- Sending SELECT query... -- Retrieving rows... -- Disconnecting from localhost...
mysql> use test01; Database changed mysql> select * from test02 into outfile 'e:\temp\20170507\a5.sql' -> ; ERROR 1 (HY000): Can't create/write to file 'e: emp20170507a5.sql' (Errcode: 2 - No such file or directory) mysql> select * from test02 into outfile 'e:/temp/20170507/a5.sql'; Query OK, 8 rows affected (0.00 sec)
恢复数据:
使用load data方法
mysql> load data infile 'e:/temp/20170507/a5.sql' into table test03; Query OK, 8 rows affected (0.03 sec) Records: 8 Deleted: 0 Skipped: 0 Warnings: 0
使用mysqlimport方法
C:\Users\Administrator>mysqlimport --user root --password -v test01 e:/temp/2017 0507/test03.sql Enter password: **** Connecting to localhost Selecting database test01 Loading data from SERVER file: e:/temp/20170507/test03.sql into test03 test01.test03: Records: 8 Deleted: 0 Skipped: 0 Warnings: 0 Disconnecting from localhost
相关文章推荐
- linux备份mysql数据库与恢复mysql备份数据
- Linux下mysql数据库的数据备份与恢复
- MySQL数据库遭到攻击篡改(使用备份和binlog进行数据恢复)
- MySQL数据库的数据备份和恢复之mysqldump详解
- C#实现MySQL数据库数据的备份与恢复
- MySQL数据库的用户权限使用和数据的备份和恢复
- 用mysqldump对MySQL数据库进行数据备份与恢复
- mysql数据库的数据备份和恢复
- MySQL数据库命令行下的数据备份与恢复命令
- MySQL数据库命令行下的数据备份与恢复命令
- Mysql数据库常用的命令 数据备份 恢复 远程
- mysql数据库的用户权限使用和数据的备份和恢复
- MySQL数据库遭到攻击篡改---使用备份和binlog进行数据恢复
- CentOS中MySQL数据库的数据备份和恢复
- MySQL数据库的数据备份和恢复(导入和导出)命令操作语法【转】
- 使用XtraBackup恢复|备份 Mysql数据库 -- 数据恢复篇
- linux备份mysql数据库与恢复mysql备份数据
- mysqldump对MySQL数据库进行数据备份与恢复
- MySQL数据库的数据备份和恢复详解