Home >Database >Mysql Tutorial >一句命令完成MySQL的数据迁移(轻量级数据)_MySQL

一句命令完成MySQL的数据迁移(轻量级数据)_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 13:25:24939browse

bitsCN.com 用管道符将mysqldump的输出流和mysql的输入流串接在一起,管道符真是一个伟大的发明。


mysqldump -uXXX -pYYY -h192.168.4.98 -P3306 DBNAME --skip-lock-tables | mysql -uroot -h127.0.0.1 DBNAME


首先要保证本地可以连接服务器上的3306端口,如果win2003系统相同直接复制数据库文件夹即可。bitsCN.com

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn