试图迁移本地MySQL服务器到AWS [英] Trying to migrate local mysql server to AWS

查看:135
本文介绍了试图迁移本地MySQL服务器到AWS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请就如何我的本地MySQL服务器迁移到云中。

目前我有Fedora Linux中和NAS通过以太网连接到它。 我相信,去了解它最好的办法是:

  1. 在采取所有数据库的mysqldump的
  2. 创建一个Amazon RDS实例,并尝试从创建的mysqldump加载
  3. 转移到该实例本地连接

我是在正确的轨道? 我应该如何去这样做(1)。我到MySQL服务器的用户名和密码的访问,它只有1个数据库。我试图按照网上一些联系,但该命令似乎没有工作。

时(2)甚至可能吗?

最终目标是从本地服务器连接到数据库服务器上的AWS,并能够无缝地查询。

解决方案

我已经做了类似的迁移,我认为你是在正确的轨道。

  

我应该如何去这样做(1)?

只要看看你的数据库的mysqldump和其存储在一个文件中,例如:

 的mysqldump -h [主持人] -u [用户] -p [密码] [DBNAME] GT; dumpfilename.sql
 

  

是(2)甚至可能吗?

当然可以。您可以连接到MySQL的RDS实例,就像你连接到任何其他MySQL实例。主机名refered为在AWS管理控制台终点。

您已经创建了RDS实例,并设置安全组的一个,你就可以加载转储:

 的mysql -h [终点] -u [用户] -p [密码] [DBNAME] LT; dumpfilename.sql
 

Please advise on how to migrate my local mysql server to the cloud.

Currently I have a Fedora linux box and a NAS attached to it via ethernet. I believe the best way to go about it is :

  1. Take a mysqldump of all databases
  2. Create an amazon RDS instance and try to load from the created mysqldump
  3. Shift local connection to this instance

Am I on the right track ? How should I go about doing (1). I have a username and password based access to the mysql server and it has only 1 database. I tried to follow a few links on the net but the commands did not seem to work.

Is (2) even possible ?

The end goal is to connect from local servers to DB server on AWS and be able to query seamlessly.

解决方案

I've done similar migrations and I think you're on the right track.

"How should I go about doing (1)?"

Just take a mysqldump of your DB and store it in a file, e.g.:

mysqldump -h [host] -u [user] -p[password] [dbname] > dumpfilename.sql

"Is (2) even possible ?"

Absolutely. You can connect to a MySQL RDS instance just like you would connect to any other MySQL instance. The host name is refered to as "endpoint" in the AWS Management Console.

One you've created the RDS instance and setup the security group, you're ready to load the dump:

mysql -h [endpoint] -u [user] -p[password] [dbname] < dumpfilename.sql

这篇关于试图迁移本地MySQL服务器到AWS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆