MySQL Workbench
PPXwmR 一个图形化管理工具,功能类似SQL Server Management Studio (SSMS)
_Raf7 W http://dev.mysql.com/downloads/tools/workbench/ +xYu@r%R 2y`h'z MySQL 命令大全
@aS)=|Ls\ http://see.xidian.edu.cn/cpp/u/mysql_ml/ 1
uU$V
= }b1G21Dc! 1. CMD - MySQL Backup
/9_%NR[
"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump.exe" -u root -p123abc test > D:\Backup\MySQL\test_20140521.sql
N@|<3R!N*e chICc</l& 可以通过计划任务来调用MySQL_Backup.bat批处理来实现每天自动备份;
y.Z_\@ @ECHO OFF
(2b${ Q@V set y=�te:~0,4%
9^/Y7Wp/@ set m=�te:~5,2%
F~Dof({: set d=�te:~8,2%
BH'*I
yv "C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump.exe" -u root -p123abc test > D:\Backup\MySQL\test_%y%%m%%d%.sql
/si<Fp)z 2. CMD - MySQL Restore
^SpQtW118 恢复的过程,先创建一个数据库,然后进入这个数据库,使用Source来恢复数据库。
WWpMuB_G mysql.exe -u root -p
Vit-)o{zr show databases;
z|Y54o3 create database test001;
5 tKgm / use test001;
ChK-L6 source D:\Backup\MySQL\test_20140521.sql ;
3(oMASf K<^p~'f4P 3. Example
o-bH3Jkb]& ### 备份
azZtuDfv 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
S
TWH2_` Warning: Using a password on the command line interface can be insecure.
U5C]zswL ### 恢复
E_~e/y"- C:\Program Files\MySQL\MySQL Server 5.6\bin>mysql.exe -u root -p
v]M:HzP Enter password: *********
8gavcsVE[ Welcome to the MySQL monitor. Commands end with ; or \g.
zg ,=A? Your MySQL connection id is 60
<}lah%4F Server version: 5.6.10 MySQL Community Server (GPL)
)n)AmNpq
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
ou-#+Sdd Oracle is a registered trademark of Oracle Corporation and/or its
ZV--d'YiEm affiliates. Other names may be trademarks of their respective
rQl9SUs owners.
{_b2!!p Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
=Fc]mcJ69 mysql> show databases;
c@g(_%_|2 +--------------------+
i!%WEHPe | Database |
Y-bTKSn +--------------------+
"*HM8\ | information_schema |
SZT n=\ | mysql |
|= cc >] | performance_schema |
^1~lnD~0 | sakila |
k.b=EX| | test |
YZ<zlU | world |
5/Qu5/ +--------------------+
c3GBY@m 7 rows in set (0.00 sec)
<.Zh{"$qo mysql> create database test001;
f3Zf97i Query OK, 1 row affected (0.00 sec)
3Qd/X&P mysql> show databases;
OLIMgc(W +--------------------+
SW%}S*h | Database |
j^#p#`m +--------------------+
q)9n%- YgP | information_schema |
^[.}DNR95( | mysql |
r+m.!+ | performance_schema |
|pS]zD | sakila |
b>QdP$> | test |
d+G%\qpzQ | test001 |
h2x9LPLBxT | world |
*Sdx:G~gp +--------------------+
V*PL_|Q5 8 rows in set (0.00 sec)
4v/MZ:%C` mysql> use test001
lCUYE"o Database changed
@@^iN~uf mysql> source D:\Backup\MySQL\test_20140521.sql
E,tdn#_| Query OK, 1 row affected (0.00 sec)
RHBQgD$ mysql> exit
i,^3aZwJ' Bye
>i*,6Psl[Z