如何在MySQL中使用命令行实用程序从远程服务器获取数据库备份脚本? [英] how to get DB backup script from Remote Server in MySQL using command-line utility?
本文介绍了如何在MySQL中使用命令行实用程序从远程服务器获取数据库备份脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人都可以告诉我如何使用命令行实用程序从MySQL的远程服务器获取数据库备份脚本?
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
推荐答案
密码的语法错误。您需要在 -p
之后立即写入密码,而不需要空格。
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.
改为:
C:\>mysqldump -h <server ip> -u <user-id> -p<password> <db name> >
E:\dumpfilename.sql
注意<$ c后没有空格$ c> -p 。示例为 -phunter2
,其中密码为hunter2。
Notice how there is no space after -p
. An example would be -phunter2
, where the password is "hunter2".
这篇关于如何在MySQL中使用命令行实用程序从远程服务器获取数据库备份脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文