MySQL Workbench
brCL"g|} 一个图形化管理工具,功能类似SQL Server Management Studio (SSMS)
a[!:`o1U http://dev.mysql.com/downloads/tools/workbench/ ESS1 L$y ?6MUyH]a MySQL 命令大全
KAr5>^<zw http://see.xidian.edu.cn/cpp/u/mysql_ml/ AQ"rk9Z { ux'9SA 1. CMD - MySQL Backup
<{eJbN p "C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump.exe" -u root -p123abc test > D:\Backup\MySQL\test_20140521.sql
shY8h
`,c~M 可以通过计划任务来调用MySQL_Backup.bat批处理来实现每天自动备份;
AY9#{c>X @ECHO OFF
RS{E| set y=�te:~0,4%
Fdx4jc13w set m=�te:~5,2%
9.Sv"=5gz set d=�te:~8,2%
a7z%)i;Z "C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump.exe" -u root -p123abc test > D:\Backup\MySQL\test_%y%%m%%d%.sql
ae+*gkPv8 2. CMD - MySQL Restore
8(-N;<Ef2 恢复的过程,先创建一个数据库,然后进入这个数据库,使用Source来恢复数据库。
,YrPwdaTB mysql.exe -u root -p
llpgi,-= show databases;
5%fR9?) create database test001;
7C@m(oK use test001;
OL@' 1$/A source D:\Backup\MySQL\test_20140521.sql ;
!!v9\R4um 7I:<i$)V 3. Example
XiyL563gh ### 备份
F:G
Vysy C:\Users\Administrator>"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump.exe" -u root -p1234-qwer test > D:\Backup\MySQL\test_20140521.sql
@p9YHLxLjQ Warning: Using a password on the command line interface can be insecure.
)KN]"<jB
### 恢复
t,yMO C:\Program Files\MySQL\MySQL Server 5.6\bin>mysql.exe -u root -p
T'%Rkag> Enter password: *********
.!g Welcome to the MySQL monitor. Commands end with ; or \g.
"l-b(8n Your MySQL connection id is 60
DcNwtts Server version: 5.6.10 MySQL Community Server (GPL)
;-{'d8 Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
HVM(LHm=: Oracle is a registered trademark of Oracle Corporation and/or its
'X1/tB8* affiliates. Other names may be trademarks of their respective
RjG=RfB'V owners.
LhtA]z,m Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
>Te h ?P mysql> show databases;
|&0Cuwt +--------------------+
b:6e2|xf? | Database |
4k=LVu]Kcr +--------------------+
\t' ]Lf | information_schema |
\Qe`>nA | mysql |
eRvnN>L | performance_schema |
P#ot$@1v | sakila |
2vX!j!_ | test |
TWo.c _l | world |
_D~FwF&A +--------------------+
1A;f[Rze 7 rows in set (0.00 sec)
e:zuP.R mysql> create database test001;
">"B Query OK, 1 row affected (0.00 sec)
b0lZb' mysql> show databases;
X,i^OM_ +--------------------+
tk,Vp3p | Database |
&{H LYxh +--------------------+
KeE)9e | information_schema |
=@0/.oSD | mysql |
Pvu*Y0_p | performance_schema |
\XT~5N6 | sakila |
QPT%CW61M | test |
= s$UU15 | test001 |
kxVR#: | world |
R`!'c(V +--------------------+
iP^o]4[c 8 rows in set (0.00 sec)
qJf=f3 mysql> use test001
m03]SF(#3 Database changed
Z/w "zCd mysql> source D:\Backup\MySQL\test_20140521.sql
[Uw/;Kyh Query OK, 1 row affected (0.00 sec)
U|}Bk/0. mysql> exit
=`%"-A Bye
6Om)e=gU/