MySQL Workbench
zpBkP-%}E 一个图形化管理工具,功能类似SQL Server Management Studio (SSMS)
OCN@P+L3q http://dev.mysql.com/downloads/tools/workbench/ ~mK|~x01@ Y>Tok|PV MySQL 命令大全
vOi4$I~CJ http://see.xidian.edu.cn/cpp/u/mysql_ml/ H&E3RU>` XX[CTh?O% 1. CMD - MySQL Backup
?5jq)xd2 "C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump.exe" -u root -p123abc test > D:\Backup\MySQL\test_20140521.sql
L@>$
Aw r`5svY 可以通过计划任务来调用MySQL_Backup.bat批处理来实现每天自动备份;
\ICc?8oL @ECHO OFF
Hh{pp ^ set y=�te:~0,4%
t)4AQ set m=�te:~5,2%
"z9 p(|oZ set d=�te:~8,2%
#d;/Me "C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump.exe" -u root -p123abc test > D:\Backup\MySQL\test_%y%%m%%d%.sql
$BUm, 2. CMD - MySQL Restore
32x[6"T 恢复的过程,先创建一个数据库,然后进入这个数据库,使用Source来恢复数据库。
-cP7`.a mysql.exe -u root -p
$i]G'fj show databases;
SBh"^q create database test001;
j`:D BO&)\ use test001;
y ]D[JX[ source D:\Backup\MySQL\test_20140521.sql ;
WO!'(" r<c&;* 3. Example
kY^ k*-v ### 备份
DVz_;m6) 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
Q:U>nm>xA Warning: Using a password on the command line interface can be insecure.
TX).*%f[r ### 恢复
1\ Gxk& C:\Program Files\MySQL\MySQL Server 5.6\bin>mysql.exe -u root -p
_"[Ls?tRX Enter password: *********
\wF-[']N Welcome to the MySQL monitor. Commands end with ; or \g.
MFQyB+Z
Your MySQL connection id is 60
)fQ1U Server version: 5.6.10 MySQL Community Server (GPL)
__Zex5Y#- Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
s;cGf+ Oracle is a registered trademark of Oracle Corporation and/or its
,ygUy] affiliates. Other names may be trademarks of their respective
Jq?Fi'2F% owners.
a:Nf+t Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
K[yP{01 mysql> show databases;
XAZPbvG|$ +--------------------+
{2 k]$| | Database |
RM;Uq>l +--------------------+
6MNr H | information_schema |
X;n09 L`CB | mysql |
[*M': | performance_schema |
#\
uB!;Q | sakila |
)"Z6Q5k^ | test |
udXzsY9Ng | world |
..zX +--------------------+
HX)]@qL 7 rows in set (0.00 sec)
y)"rh /; mysql> create database test001;
TOhWfl; Query OK, 1 row affected (0.00 sec)
E*h!{)z@F mysql> show databases;
XhA tf@n +--------------------+
Y'5(exW | Database |
g)R 2V +--------------------+
S}a]Bt | information_schema |
TMo DN%{ | mysql |
3H0B+F2XQ | performance_schema |
0ckmHv | sakila |
C
fM[<w
| test |
hO&_VCk | test001 |
{z\K!=X/ | world |
YSB=nd_ +--------------------+
22=sh;y+2 8 rows in set (0.00 sec)
,wM4X']HR mysql> use test001
:o .+<_& Database changed
;g? |y(xv mysql> source D:\Backup\MySQL\test_20140521.sql
SJ<v< B Query OK, 1 row affected (0.00 sec)
R^$|D)( mysql> exit
8*@{}O## Bye
kaXq.