简体   繁体   English

如何进行亚马逊数据库备份(mysql)

[英]How to take backup of amazon database(mysql)

I want to take backup of database from amazon by using linux command . 我想使用linux命令从亚马逊备份数据库。 I am trying for 我正在努力

mysqldump --databases mydbname -v -h XXXXX.XXXXXX.us-west-2.rds.amazonaws.com -u username -P 3306 -p > mydbname.sql

But it gives the error 但是它给出了错误

mysqldump: Got error: 1045: Access denied for user 'username'@'125.94.62.234' (using password: YES) when trying to connect mysqldump:得到错误:1045:尝试连接时,用户'username'@'125.94.62.234'的访问被拒绝(使用密码:是)

Please help me out 请帮帮我

First of all you need to add your ip address in AWS security group 首先,您需要在AWS安全组中添加您的IP地址

you can check your ip address by type in google "what is my ip". 您可以通过在Google中输入“我的IP是什么”来检查您的IP地址。

TO add in AWS - you need to login in your AWS site 要添加AWS-您需要登录AWS网站

GOTO EC2 services then goto - Security groups under Network / security 然后转到GOTO EC2服务-网络/安全下的安全组

check your used security group and then click into inbound rule 检查您使用的安全组,然后单击入站规则

Add new rule Select Mysql Aurora / TCP / 3306 / Custom IP / your ip address. 添加新规则选择Mysql Aurora / TCP / 3306 /自定义IP /您的IP地址。

After doing all this you can use below command 完成所有这些操作后,您可以使用以下命令

mysqldump -u -p -h databasename > backup.sql mysqldump -u -p -h数据库名称> backup.sql

hope this can help you 希望这可以帮到你

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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