简体   繁体   中英

Export with mysqldump not detecting the correct Database name

To dump a database,I'm running this command

mysqldump -u doadmin -p your_password -h mysql-test-do-user-4915853-0.db.ondigitalocean.com -P 25060 your_database_name \
> /path/to/database_file.sql

After run the command it's showing error:

mysqldump: Got error: 1049: Unknown database 'your_password' when selecting the database

Then I tried with this command

mysqldump -u user --databases DB_Name -p Pass -h mysql-test-do-user-4915853-0.db.ondigitalocean.com -P 25060  \> database_file.sql 

It's executed the command and dump all 90 tables and at the end it's showing error

mysqldump: Got error: 1049: Unknown database 'DB_Name ' when selecting the database

Please let know your thoughts

请不要在参数后使用空格,按照下面的命令,它应该可以工作

mysqldump -udoadmin -pyour_password -hmysql-test-do-user-4915853-0.db.ondigitalocean.com -P25060 your_database_name > /path/to/database_file.sql

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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