从目标库导出数据 C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqldump -uroot -p testdb_db > c:/testdb.dump
导入目标库 C:\Program Files\MySQL\MySQL Server 5.7\bin>mysql --defaults-extra-file=pass.txt testdb2< c:/testdb.dump
mysql --defaults-extra-file=pass.txt 用这种方法输入用户名密码不会报以下错误。
Using a password on the command line interface can be insecure.
pass.txt的内容如下:
[client] user=root password=password
标签:password,mysql,testdb,mysqldump,MySQL,迁移,txt From: https://www.cnblogs.com/haoliansheng/p/16945556.html