繁体   English   中英

将数据库从服务器复制到另一个数据库时发生mysqldump错误

[英]mysqldump error while copying database from server to another

我正在尝试将数据库从一台服务器复制到另一台服务器

mysqldump -u<source_db_username> -p<source_db_password> -h<source_db_ip_address> source_database_name
| mysql -u<target_db_username> -p<target_db_password> -h<aws_rds_endpoint> <aws_rds_db_name>;

但是我明白了

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server 
version for the right syntax to use near 'mysqldump -u<source_db_username> -p<source_db_password> 
-h<source_db_ip_address> source_database_name ' at line 1

复制时不应该使用数据库,我只需要引用mysql位置即可使用它,并且不应该使用';' 在命令末尾,它现在可以正常工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM