D:/Program Files/MySQL/MySQL Server 5.1/bin>mysqladmin -h 10.10.136.24 -u probe
-p -P3306 create lhytest
Enter password: ***********
在两台机器之间移动数据库的最简单(尽管不是最快)的方法是在数据库所在的机器上运行下面的命令
D:/Program Files/MySQL/MySQL Server 5.1/bin>mysqldump -h localhost -u root -pact
ion -P kk3g | mysql -h 10.10.136.24 -u probe -P kk3g
ERROR 1045 (28000): Access denied for user 'probe'@'10.10.136.226' (using passwo
rd: NO)
D:/Program Files/MySQL/MySQL Server 5.1/bin>mysqldump -h localhost -u root -pact
ion -P kk3g | mysql -h 10.10.136.24 -u probe -p -P kk3g
Enter password: ***********
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the ma
nual that corresponds to your MySQL server version for the right syntax to use n
ear 'Usage: mysqldump [OPTIONS] database [tables]
OR mysqldump [OPTIONS] --databa' at line 1
将本地的数据备份到10.10.136.24 服务器中去
命令如下
D:/Program Files/MySQL/MySQL Server 5.1/bin>mysqldump -h localhost -u root -pact
ion -P3306 lhytest | mysql -h 10.10.136.24 -u probe -pprobeaction -P3306 lhytest
1、localhost 知道db的表可以与10.10.136.24中的表不一致
2、如果在10.10.136.24中没有表,他会自动创建表
备份表 test表
D:/Program Files/MySQL/MySQL Server 5.1/bin>mysqldump -h localhost -u root -pact
ion -P3306 lhytest test | mysql -h 10.10.136.24 -u probe -pprobeaction -P3306 lhytest