MySQL Workbench
UzKFf&-:;K 一个图形化管理工具,功能类似SQL Server Management Studio (SSMS)
GOSI3RRn http://dev.mysql.com/downloads/tools/workbench/ =6=_/q2 xAwf49N~ MySQL 命令大全
6S.~s6o, http://see.xidian.edu.cn/cpp/u/mysql_ml/ tVqmn Sg]
J7;] 1. CMD - MySQL Backup
{6d b{ ay_ "C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump.exe" -u root -p123abc test > D:\Backup\MySQL\test_20140521.sql
8@M'[jT cUK\x2 可以通过计划任务来调用MySQL_Backup.bat批处理来实现每天自动备份;
M;Wha;%E" @ECHO OFF
n~Szf set y=�te:~0,4%
=f:(r'm?r. set m=�te:~5,2%
sg'NBAo" set d=�te:~8,2%
ex?\c" "C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump.exe" -u root -p123abc test > D:\Backup\MySQL\test_%y%%m%%d%.sql
%HSl)zEo>C 2. CMD - MySQL Restore
`ycU-m== 恢复的过程,先创建一个数据库,然后进入这个数据库,使用Source来恢复数据库。
OCHm; mysql.exe -u root -p
zfjTQMaxh show databases;
(3md:r<- create database test001;
agaq`^[(P use test001;
H/+{e,SW" source D:\Backup\MySQL\test_20140521.sql ;
CW:gEm+ D{AFL.r{ 3. Example
ma9ADFFT ### 备份
, deUsc 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
lIuXo3 Warning: Using a password on the command line interface can be insecure.
'8r8%XI ### 恢复
Yg6If7& C:\Program Files\MySQL\MySQL Server 5.6\bin>mysql.exe -u root -p
m.V,I}J.q Enter password: *********
k,X74D+ Welcome to the MySQL monitor. Commands end with ; or \g.
"2mFC! Your MySQL connection id is 60
+v[O Server version: 5.6.10 MySQL Community Server (GPL)
,#aS/+;[) Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
CT}' ")Bm Oracle is a registered trademark of Oracle Corporation and/or its
/p$=Cg[K affiliates. Other names may be trademarks of their respective
$WNG07]tU owners.
)nnCCRS6 Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
PEy/k. mysql> show databases;
M]B3vPA/v +--------------------+
/:Y9sz uW` | Database |
WFj*nS^~l
+--------------------+
S*rO0s: | information_schema |
~BQV]BJ7 | mysql |
bqjr0A7{ | performance_schema |
3q CHh | sakila |
fD(7FN8 | test |
UnjNR[= | world |
;24'f-Eri +--------------------+
s@z{dmL 7 rows in set (0.00 sec)
lDlj+fK mysql> create database test001;
[%t3[p<)O Query OK, 1 row affected (0.00 sec)
`11#J;[@G mysql> show databases;
g#Mv&tU +--------------------+
)+*{Y$/U | Database |
'jN/~I +--------------------+
p6 <}3m$ | information_schema |
/4^G34 | mysql |
2@4x"F]U; | performance_schema |
^A- sS~w | sakila |
KCl &H | test |
Ogd8!'\ | test001 |
U|9U(il | world |
-!i;7[N +--------------------+
)>?! xx_` 8 rows in set (0.00 sec)
qP qy4V.; mysql> use test001
u>81dO]H Database changed
>kt~vJI mysql> source D:\Backup\MySQL\test_20140521.sql
)-)ss"\+Ju Query OK, 1 row affected (0.00 sec)
{3.*7gnY\L mysql> exit
a5X`jo Bye
p}96uaC1