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