mysql mydump还原_用mydump对所有数据库进行备份,还原具体案例
現有的測試數據:
對所有數據庫做備份:
C:\Users\Administrator>mysqldump -u root -p--all-databases> D:\mysql_bak\201409111654_all_database.bak
Enter password: *******
刪除jiao和dan_test數據庫里t表的數據:
導入文件進行恢復:
C:\Users\Administrator>mysql -u root -p < D:\mysql_bak\201409111654_all_database
.bak
Enter password: *******
C:\Users\Administrator>mysql -u root -p
Enter password: *******
Welcome to the MySQL monitor.? Commands end with ; or \g.
Your MySQL connection id is 55
Server version: 5.5.21 MySQL Community Server (GPL)
Copyright (c) 2000, 2011, 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 dan_test;
Database changed
mysql> select *
-> from t;
+------+
| id?? |
+------+
|??? 1 |
|??? 2 |
+------+
2 rows in set (0.00 sec)
mysql> use jiao;
Database changed
mysql> select *
-> from t;
+------+
| id?? |
+------+
|??? 1 |
+------+
1 row in set (0.00 sec)
mysql>
--若想了解怎么用mysqldump備份還原某個數據庫具體案例,請參考:http://write.blog.csdn.net/postedit/39207889
總結
以上是生活随笔為你收集整理的mysql mydump还原_用mydump对所有数据库进行备份,还原具体案例的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ldap基本dn_LDAP学习笔记 -
- 下一篇: java模拟atm 课程设计_急求,关于