how to get DB backup script from Remote Server in MySQL using command-line utility?

杀马特。学长 韩版系。学妹 提交于 2019-12-10 17:13:23

问题


Can anybody tell me that how to get DB backup script from Remote Server in MySQL using command-line utility?

I'm using a command as follows, but not working:

C:\>mysqldump -h <server ip> -u <user-id> -p <password> <db name> >
 E:\dumpfilename.sql

回答1:


The syntax for the password is wrong. You need to write the password immediately after the -p, without a space. That's why the password is interpreted as the database name.

Write this instead:

C:\>mysqldump -h <server ip> -u <user-id> -p<password> <db name> >
 E:\dumpfilename.sql

Notice how there is no space after -p. An example would be -phunter2, where the password is "hunter2".



来源:https://stackoverflow.com/questions/10846443/how-to-get-db-backup-script-from-remote-server-in-mysql-using-command-line-utili

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!