简体   繁体   English

将数据库导入AWS RDS DB

[英]Importing a DB into AWS RDS DB

I want to import a mySQL DB into an AWS mySQL DD by using a sql file that I previously exported from another DB, I am using Sequel Pro but I take ages. 我想使用以前从另一个数据库导出的sql文件将mySQL数据库导入到AWS mySQL DD中,我正在使用Sequel Pro,但是我花了很多时间。 I would like to know if there is a faster way to do it, like uploading directly the sql file to AWS instead of using Sequel Pro 我想知道是否有更快的方法,例如直接将sql文件上传到AWS而不是使用Sequel Pro

Yes, It will take time because you are making the import via client tool and this transmission is happening over the public internet. 是的,这将花费一些时间,因为您正在通过客户端工具进行导入,并且此传输正在公共互联网上进行。 Best and secure way to import the database are 导入数据库的最佳和安全方法是

1 - Create a Dedicate EC2 instance in the same VPC of RDS 1-在RDS的同一VPC中创建专用EC2实例

2 - Zip the backup file using the best compression tool to Decrease the Size and ship it to EC2 instance directly via SCP 2-使用最佳压缩工具压缩备份文件以减小大小并直接通过SCP将其发送到EC2实例

3 - Once Shipping Process completed, Unzip the backup file and Import using Traditional import command. 3-运输过程完成后,解压备份文件并使用“传统导入”命令导入。 This import process will happen over private networks 此导入过程将通过专用网络进行

mysql -u username -ppassword database_name table_name(Optional) -h endpoint of RDS mysql -u用户名-ppassword database_name表名(可选)-h RDS的端点

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

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