MySQL Workbench
:L gFd 一个图形化管理工具,功能类似SQL Server Management Studio (SSMS)
tSX<^VER7 http://dev.mysql.com/downloads/tools/workbench/ T\7z87Q |hBX" MySQL 命令大全
R~OameRR http://see.xidian.edu.cn/cpp/u/mysql_ml/ LVNq@,s &4 Py 1. CMD - MySQL Backup
VN!`@Ci/ "C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump.exe" -u root -p123abc test > D:\Backup\MySQL\test_20140521.sql
):"Z7~j= A[lbBR 可以通过计划任务来调用MySQL_Backup.bat批处理来实现每天自动备份;
Ip#BR!$n @ECHO OFF
`K -j set y=�te:~0,4%
{No*Z'X set m=�te:~5,2%
GJ YXCi set d=�te:~8,2%
%04N"^mT'~ "C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump.exe" -u root -p123abc test > D:\Backup\MySQL\test_%y%%m%%d%.sql
eeKErpj8A 2. CMD - MySQL Restore
I5EKS0MQ! 恢复的过程,先创建一个数据库,然后进入这个数据库,使用Source来恢复数据库。
4n6EkTa mysql.exe -u root -p
M "QT(u+ show databases;
\XDc{c] create database test001;
QwF\s13 use test001;
+?"N5%a%F source D:\Backup\MySQL\test_20140521.sql ;
Ns?qLSN l!r2[T]I@7 3. Example
B[XVTok ### 备份
%:61@< 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[g>ee Warning: Using a password on the command line interface can be insecure.
#<_gY ### 恢复
QGv$ ~A[h C:\Program Files\MySQL\MySQL Server 5.6\bin>mysql.exe -u root -p
Af*e:}} Enter password: *********
pwj ? Welcome to the MySQL monitor. Commands end with ; or \g.
Y&vn`# Your MySQL connection id is 60
BGk>:Z` Server version: 5.6.10 MySQL Community Server (GPL)
4<`Qyul- Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
CcF$?07 i Oracle is a registered trademark of Oracle Corporation and/or its
q> ;u'3} affiliates. Other names may be trademarks of their respective
G8]DK3# owners.
_e2=BE`W) Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
$-HP5Kj(k- mysql> show databases;
,tt
.oF|
+--------------------+
pN\YAc*@: | Database |
9\yGv +--------------------+
yH\3*#+ | information_schema |
rV
yw1D | mysql |
QNH-b9u>8 | performance_schema |
NNKI+!vg | sakila |
h8nJt>h | test |
.G ^-.p | world |
gD13(G98 +--------------------+
+ESEAi91 7 rows in set (0.00 sec)
UN
FQ`L mysql> create database test001;
w^AY= Fc Query OK, 1 row affected (0.00 sec)
cO8':P5Q mysql> show databases;
$;4y2?E +--------------------+
W2$MH: j | Database |
j_(DH2D +--------------------+
b7^Db6qu | information_schema |
Io(*_3V)B | mysql |
YaBZ#$r | performance_schema |
3R}O3#lj, | sakila |
*]7$/%.D | test |
OV"uIY[%8V | test001 |
[%uj+?}6O | world |
H|.cD)&eYy +--------------------+
F3?PlH:Y 8 rows in set (0.00 sec)
wv7XhY} mysql> use test001
S"@/F-
81 Database changed
l%_r 3W mysql> source D:\Backup\MySQL\test_20140521.sql
5r)]o'?s Query OK, 1 row affected (0.00 sec)
m|M'vzu1 mysql> exit
Hrg~<-.La Bye
3J_BuMV