Can AWS RDS be used as a MySQL host only? - mysql

Is it possible to use AWS' RDS MySQL solution in tandem with my current file server host? By that, I mean, can I connect to the RDS MySQL server as I am with my hosts current database?
I've tried the AWS documentation but it seems a bit flaky in this area.
Thank you,

Amazon RDS is a database server, just like any other. If you start up an RDS MySQL server, you can connect to it from anything else that can connect to a MySQL server.
The difference is that you do not have direct host access to the RDS server. Meaning, you cannot SSH into it and get a command prompt.
But you can connect to it from any MySQL client, including MySQL Workbench.

Related

How to access MySQL running on an EC2 instance from Lambda?

Is it possible to use Lambda(triggered by AWS IoT) to read/write to a MySQL server running on an EC2 instance? If so how would you do that? All info I see on internet seems to relate specifically to Amazon RDS rather than EC2 instances.
Thanks, Marcus
You need to connect the Lambda to the subnet where the MySQL server is running. See https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html.
Once that is done, you can connect to it using the server's private IP, as you normally would any MySQL server.

How to run SQL Profile on AWS Aurora or Mysql

What tool can I use to run sql profile against a AWS Aurora or AWS Mysql database? Seems like a simple task that I have done many times against local mysql sql db or ms sql server, but for the life of me I cannot get to work. Is this something that can be done? I have been trying to use Neor Profile without success. However, I'm able to use Neor Profile successfully on my local mysql db.
Because Neor Profile basically serves as a proxy, you have to use port 4040 in your application and then Neor connects to AWS via port 3306. I can successfully get Neor Profile 'profiling' against the AWS db but when I run my local application or mysql workbench, via port 4040, it doesn't connect, with a general connection error.
My question, which I can't find by searching the Internet or help files is...Can you perform a sql profile against a AWS Aurora or AWS Mysql database?

Setting up master/slave databases on same server?

I'm looking to have a master and slave DB on the same server, both in an Amazon RDS instance. Is this possible? I'm using MySQL Workbench to access it and am a little confused with the instructions I have seen so far.
"On the same server" is not possible with Amazon RDS for MySQL, because RDS is a managed service. Amazon provides, configures, and has exclusive access to the actual server where an RDS instance is running... you, the user, do not have direct (shell) access to that machine, so you can't do the kind of customization of configuration that running a master and slave on the same server would require.
Other being not possibile since RDS is a managed MySQL (you don't have SSH access or SUPER privileges) it would be also not that useful:
You make a slave replica for scaling out or for backup/failover, on the same machine it doens't make sense

How Ruby on rails works with Amazon RDS

I have a ruby on rails run on amazon ec2, database is mySQL.
Now I want to use Amazon RDS to backup this database in case the ec2 fails.
I read through the Amazon RDS user guide,it tells how to create a DB instance.
My question is:
1.what is the relation between created DB instance and my ec2 database?
2.When the DB instance "connect" to my ec2, what will happen?
The data used to send to ec2 mySQL server will be send to DB instance?
Is the database totally shifted to DB instance?So before I connect I should creare a same database in DB instance and tell ec2 send data to RDS ever since
3.If not,how the DB instance know the ec2 is down and takeover the data?
EDIT:
(Unsure)Is it that DB instance is just a place to put database.In order to use it,I need to set up database in DB instance,then connect to it by modifying database.yml file(this file tell rails server where the stored data goes).
How Is it possible to tell when the local database stops then at that time switch to DB instance?
There is absolutely no relationship between your EC2 MySQL DB and the RDS DB Instance. So what you are asking for is just not possible.
A better approach I would say is to have only RDS (No need to have MySQL running locally on EC2 instance). RDS takes snapshots regularly. Also, RDS is a managed service, so most of the MySQL administration tasks are handled by AWS and you don't have to worry. And you can rely on RDS snapshots from Backup perspective.

How does one see what data is stored in the RDS database?

Running our app on Amazon RDS. How does one review / inspect data in the database? For example, how can I get a list of articles?
My app is running on Ruby on Rails and on Heroku. One method I thought of, is by running the Heroku console command.
Is there a better way to see what data is stored in the RDS database?
I use MySQL Workbench to view data, run queries, and so on. It connects right up to the Amazon RDS MySQL instance using the regular MySQL settings.
Updated:
Be sure to add the ip address of the computer for which you're connecting to the RDS instance to the access list in RDS. IIRC, by default RDS instances will only accept connections from within AWS.
I was using SequelPro but they don't support ssl. Amazon RDS says something to the effect of having to use SSH to connect your EC2 to your RDS.
This is essentially what was done in the following tutorial which uses MySQL Workbench: http://thoughtsandideas.wordpress.com/2012/05/17/monitoring-and-managing-amazon-rds-databases-using-mysql-workbench/
I had also been using SequelPro before but this tutorial is very clear and I was up and running on MySQL Workbench in just a few minutes.