设为首页 加入收藏

TOP

辛星解读使用mysqldump来进行热备份(二)
2015-07-24 10:18:21 来源: 作者: 【 】 浏览:4
Tags:辛星 解读 使用 mysqldump 进行 备份
ldump --help C:\Users\Administrator>

这里我怕大家理解不是很清楚,就特意来解释下吧,第一个是说我们可以导出一个数据库,也可以导出一个数据库下的表,第二个是说我们可以导出n多个数据库,但是需要加上--databases来说明,第三个则直接导出所有数据库。

既然有备份,就会有恢复,我们使用mysql命令即可,比如我创建一个an数据库,它使用咱们备份的文件中的数据,咱们看下面操作,我就不单个演示了,这里咱们的数据库an就拿到了我们的备份数据,顺便说一下,这个数据库an必须提前建好,它不具有自己创建新数据库的能力:

C:\Users\Administrator>mysql -u root -proot an < D:\my.sql
mysql: [Warning] Using a password on the command line interface can be insecure.

C:\Users\Administrator>mysql -u root -proot
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 124
Server version: 5.7.3-m13 MySQL Community Server (GPL)

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use an
Database changed
mysql> show tables;
+---------------------------+
| Tables_in_an              |
+---------------------------+
| columns_priv              |
| db                        |
| event                     |
| func                      |
| general_log               |
| help_category             |
| help_keyword              |
| help_relation             |
| help_topic                |
| innodb_index_stats        |
| innodb_table_stats        |
| ndb_binlog_index          |
| plugin                    |
| proc                      |
| procs_priv                |
| proxies_priv              |
| servers                   |
| slave_master_info         |
| slave_relay_log_info      |
| slave_worker_info         |
| slow_log                  |
| tables_priv               |
| time_zone                 |
| time_zone_leap_second     |
| time_zone_name            |
| time_zone_transition      |
| time_zone_transition_type |
| user                      |
+---------------------------+
28 rows in set (0.00 sec)

mysql>
首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇MySQLCluster详细配置文件(config.. 下一篇推荐一款免费的SQLsever的备份软..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·C/C++ 类模板与模板 (2025-12-27 01:49:52)
·C语言 模板化<templ (2025-12-27 01:49:49)
·C/C++模板类模板与函 (2025-12-27 01:49:46)
·如何理解c语言指针和 (2025-12-27 01:19:11)
·为什么C标准库没有链 (2025-12-27 01:19:08)