Question

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.

Was it helpful?

Solution

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top