How do I migrate an AWS RDS MySQL database to PostgreSQL? - mysql

I currently have a MySQL AWS RDS instance, that I'd like to migrate over to PostgreSQL so that I can get off AWS and use Heroku instead.
I've tried PGLOADER,and when I enter in what I think is my MySQL database URI (mysql://username:password#hostname:port/database) and the provided PostgreSQL URI from Heroku, I get an error saying that there's no such file or directory "mysql://username:password".
I have also tried Pentaho, and I can get PostgreSQL to connect, but when I try to connect to my MySQL RDS instance, Pentaho times out, and I'm not where the my.ini file mentioned in this article is located at in order to fix it.
Any other options for migrating from MySQL to Heroku Postgres would be very appreciated.

Related

How did mysql workbench get my old database?

I created database using mysql from phpmyadmin for some practice purposes. Now I've just downloaded and set up mysql workbench and right after I saw my old database which I created in phpmyadmin and that makes me wonder how did workbench get it?
Both phpMyAdmin and MySQL Workbench are administration/client tools. It is used to connect MySQL Service running on your machine / remote machine called server. (usually on port 3306).
When you create databases or store data which is stored under a folder represented as datadir which is owned by the MySQL service.
how did workbench get it?
Database is managed by MySQL Service, like a phpMyAdmin, Workbench also another client, connecting to same MySQL Service.
Similarly, you can use any other MySQL Client to connect with the same MySQL service running on your machine.
Additionally, you can refer my blog to understand more about MySQL Architecture.

Create new AWS RDS instance and import data rather than update MySQL version from 5.6 to 5.7

I currently have an RDS instance running in AWS based on mysql version 5.6. I need to update it to 5.7 and the main thing recommended is to use the major update functionality in AWS console. However, I have looked through the documentation and it seems quite complicated so I was wondering if the following procedure is a valid workaround that will achieve the same result?
Create a new RDS instance based on mysql version 8 (can also do 5.7)
Export data in database from original RDS instance into a dump file (using export data functionality of mysql workbench)
Reconnect existing bastion EC2 instance to connect to new RDS instance with mysql version 8 (using mysql workbench) and access new RDS through that
Import database from dump file created in step 2 into the new RDS instance (using import data functionality of mysql workbench)
Configure application to use details of the new RDS instance
Is this a valid procedure? If not, what is wrong with it?
Your procedure looks good. Do not forget to set inbound rules on the new RDS instance. Using MySQL Workbench is a good way to move data once you connect to your new instance. Once you have the new version all setup, inbound rules set, and data ported to the new instance, be sure to delete the old RDS instance as well.

How can I move my Amazon RDS MySql database to Heroku

I currently have a MySql database in Amazon RDS I'd like to move over to Heroku Postgres. (I would just connect my Heroku app to Amazon RDS, but I don't really want my database to be open to the public).
How can I move my database? I'd imagine:
Download from RDS
Convert MySql -> Postgres
Upload to Heroku
What's typically the best way to do something like this? Do I have to convert the database type?

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?

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.