How to copy a database from my laptop into AWS - mysql

I have defined a schema and populated with data into MySql on my laptop. However, due to the large-scale of the datasets, the computing time suffers in the following analysis stage in python. So I decide to try to move all my work to cloud. I'm wondering if there is anyway to let the server in AWS directly connect to the mysql server in my laptop so that I can use the existing datasets without recollect them.

You may be interested in AWS Database Migration Service.

You can use DMS database migration service of aws which will do everything for you.
https://aws.amazon.com/dms/
But you have to take care about foreign key and other data. sometime it is generating the error.
DMS will transfer all of your data from laptop to aws database which will be on RDS or you can choose.

Related

Unable to decouple postgres db from ElasticBeanstalk Instance

We have an ElasticBeanstalk instance, with an internal postgres database.
As you know, there's the possibility to have internal (coupled) or external (decoupled) databases on ElasticBeanstalk
Since last year, there is the possibility to decouple internal databases from an ElasticBeanstalk instance, since these are coupled or 'tied' to the instance itself.
We want to have an external database instead of the internal one, because the new external database is encrypted, anyway, that's the reason why we want to decouple the existing one.
But if I go EB->Environments->Environment->Configuration->Database section
Then click 'Decouple Database', it shows me a MySQL related error (???), the db is postgres, no doubts about it, there's no hint to MySQL at any point in the lifetime of this EB instance.
And if I try from the eb cli the error is different but always MySQL related:
Any ideas about this?

Migrating Very Large Data Set from Local Machine To AWS RDS (Aurora)

I had a question regarding migrating large data form my local machine to AWS RDS (Aurora DB). Basically I have local mysql database that has couple of tables with around 4GB of data. I need to replicate this data in AWS RDS. The approach I was thinking was to make INSERT call to the RDS but with this huge amount of data (32 million rows), the process would be costly. I did see some resources on exporting data from local and importing it in RDS but could not quite understand how it works. Does someone have a good idea about this and advice me on what would be the best process. PS: the data only exist on local machine and not in any servers.
Dump a CSV extract into S3 then use an AWS migration tool, I.e. see: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Integrating.LoadFromS3.html

Replicate Data Regularly from AWS RDS (MySQL) to another Server (EC2 instance)

We have a large AWS RDS(MySQL) Instance and we need to replicate data from it to another Ec2 Instance, daily at a certain time for reporting and analysis purpose.
currently we are using mysqldump to create a dump file and then copy the whole schema which takes a lot of time. Is there a faster way of doing this, it would be a lot better if it copies only the new records.
How can we copy data without copying whole schema every time?
You should look at the Database Migration Service. Don't be confused by the name. It can do continuous or one time replication. From the FAQ:
Q. In addition to one-time data migration, can I use AWS Database
Migration Service for continuous data replication?
Yes, you can use AWS Database Migration Service for both one-time data
migration into RDS and EC2-based databases as well as for continuous
data replication. AWS Database Migration Service will capture changes
on the source database and apply them in a transactionally-consistent
way to the target. Continuous replication can be done from your data
center to the databases in AWS or in the reverse, replicating to a
database in your datacenter from a database in AWS. Ongoing continuous
replication can also be done between homogeneous or heterogeneous
databases. For ongoing replication it would be preferable to use
Multi-AZ for high-availability.
You can use AWS Glue to do the database migration as an ETL job periodically.
You can also consider using AWS Data Migration Service (DMS).
However AWS Glue is preferred over DMS for ETL jobs that runs within AWS and you are familiar with Python or Scala to write the transformation logic.
Q: When should I use AWS Glue vs AWS Database Migration Service?
AWS Database Migration Service (DMS) helps you migrate databases to AWS easily and securely. For use cases which require a database migration from on-premises to AWS or database replication between on-premises sources and sources on AWS, we recommend you use AWS DMS. Once your data is in AWS, you can use AWS Glue to move and transform data from your data source into another database or data warehouse, such as Amazon Redshift.

How to Synchronize MySQL Database from an On Premise to Amazon RDS

I am new to Amazon RDS, and looking to get answer for my question below and couldn't find the answer on stackoverflow yet.
I have a MySQL Database on premise that I want to synchronize with the MySQL Database on Amazon RDS. I understand that replication is possible with Amazon RDS, but how about continuous synchronization? Say my existing local database has one transaction that has been made, I want to synchronize just that transaction, either immediately or by schedule, so that I don't need to replicate the whole thing to RDS.
Does RDS have this feature for MySQL or any other database?
If not, what tools should I be using? EC2 + ? ?
Or is there any database that supports this so I can just run the database on EC2?
Your best (first) option should probably be the AWS Database Migration Service. This is a migration service for exactly your use-case.
If uptime is less of an issue, you could always do a mysql_dump, move that to an EC2 instance and load that into an RDS instance.

need to connect my same apps with one database

i have 3 servers for three applications on aws ec2 using MySql database,
now each of the application is having amember that is client subscription app,
it connects with sql databse that is created in each instance
so in this way every amamber app is having diffrent database in each server,
now we are working with a device ROKU we need to pass the XML attributes from amember to it
to varify the user so he can watch online streaming tv.
the objective
now i need to make one database that will be connected with each server using amember
so each server access one database .
Options
my options are aws RDS ,dynamoDb
Now can anyone put me in the right direction, for that.
in simple Words
need to connect my multiple apps (same app) with one database
HELLLLP
If you need to connect to a mysql database, DynamoDB is not the answer. It isn't a mysql database.
RDS is a mysql database. It connects like any other mysql database. You haven't mentioned what language[s] you are using, however. Googling "connect to mysql with [language]" should help.
I think it would be best to stick with relational databases such as MySQL.
Amazon RDS is a managed MySQL solution, but you don't have to use it for your needs.
You can use one of your EC2 instances or a new EC2 instance as the central DB and connect all the other servers to it for quires. There are pros and cons for choosing RDS over your own SQL server. If you have any questions there, feel free to edit your question and add them.
EDIT according to comment
In order to connect your application with the local MySQL. Your are probably using a connection string that points to either "localhost" or "127.0.0.1"... That is the IP of your local machine. You will have to change it to the remote IP of the machine where the DB is stored remotely.