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

匿名 (未验证) 提交于 2019-12-03 01:23:02

问题:

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".



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