如何使用命令行实用程序从MySQL中的远程服务器获取数据库备份脚本?

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


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

谁能告诉我如何使用命令行实用程序从MySQL中的远程服务器获取数据库备份脚本?

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 个解决方案

#1


5  

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.

密码的语法错误。您需要在-p之后立即写入密码,没有空格。这就是密码被解释为数据库名称的原因。

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

请注意-p之后没有空格。一个例子是-phunter2,其中密码是“hunter2”。

智能推荐

注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:http://www.silva-art.net/blog/2012/06/01/b89b0db6d76c721642f7a7f1f041a5bd.html



 
© 2014-2019 ITdaan.com 粤ICP备14056181号  

赞助商广告