I have a Ruby On Rails App on Elastic Beanstalk with MySQL RDS, and I want to migrate it to Aurora MySQL, I could migrate my database and I have the new endpoint of Aurora MySQL, I first tried to connect it in my development environment to check if everything was going good, but when I try to deploy in production I got an error by elastic beanstalk "12_db_migration.sh failed.", but It does not have sense because I connected the database in development and It worked, It looks like if elastic beanstalk couldn't connect to the database, all credentials are correct. There are not pending migrations, and the error message does not have sense. Something important is that my previous MySQL version is 5.7.24 and the MySQL version of my new Aurora MySQL database is 5.7.12, but I think It doesn't matter because in development worked well.
Thank you.
okay, I could fix it, the problem was that I was written my credentials in database.yml file without using environment variables, I was testing something and I didn't use environment variables, and It looks that I cannot do that, I use environment variables in the file and everything worked.
Related
I want to host a django project on heroku. Locally, I developed it using MySQL database. And I have also pushed it to heroku but I get an Error message whenever I run heroku open command on command prompt. The error message is Can't connect to local MySQL server through socket. Though I'm a newbie in using databases, the way I understand the error is that heroku can't connect to local MySQL server which I'm using for local development. I don't want to connect to a remote MySQL database, instead, I want to connect to Postgre database just as heroku recommended.
Being a newbie in the use of database, I don't know the best way to migrate to Postgre or how to add MySQL in my project to .gitignore. Is it possible for me to start running Postgre on heroku while MySQL isn't added to . gitignore and is still the database in settings.py? Must I clear MySQL database or add it to gitignore before I can use Postgre?
PostgreSQL settings for Heroku:
Please install dj_database_url using below command:
pip install dj-database-url
In settings.py , import dj_database_url and add below settings at the end of the file:
import dj_database_url
db_from_env = dj_database_url.config(conn_max_age=500)
DATABASES['default'].update(db_from_env)
Done !! Now, deploy again to Heroku.
I'm new to using Heroku and I have a nodejs app in which I plan on using a MySQL database as the main data store and please tell me how setup mysql in heroku
You need to use an add-on for this. There is one for MySQL provided by ClearDB.
I've recently started using AWS Aurora to take advantage of the improvements over standard MySQL. I have a REST API running that connects either to the main cluster endpoint, or the read endpoint if the request will only perform SELECTs. Obviously I want to test this locally so that I don't mark any routes as read only if they're not.
I installed mysql with Homebrew and have it running as a service. What I need to do now is have another mysql instance running on a different port, and then set up read replication between my original instance and the new one.
Does anyone have any idea how I go about this?
Hi I'm trying to migrate a database that was created with cakePHP on a local MYSQL database. I know that in rails the solution is to install the postgres gem that will handle the migration, but I'm wondering more specifically about cakePHP.
I've generated a sqldump of the mysql database using the solution here:
http://book.cakephp.org/2.0/en/console-and-shells/schema-management-and-migrations.html
I've also installed postgres locally onto my machine and am able to connect to my remote empty HEROKU database from the command line by using heroku pg:psql
However, if I run the SQL dump file directly in the console I get an error called SSL SYSCALL error: Software caused connection abort. This apparently is because as a DEV / Free database account you are restricted from entering SQL commands directly.
So, that would suggest that I would have to go and use something like
heroku db:push localdatabase herokudatabase
But that produces the error Sequel::AdapterNotFound -> LoadError: 193: not a valid Win32 application
Any ideas how I might manage this migration, bearing in mind that as it's a CakePHP application I do not have the option of just installing a PostGres gem?
Thanks for any direction, or thoughts.
You almost certainly want to install Postgres locally on your machine, and get your database and code working correctly there. Once it's set up, it's easy to do a dump of your Postgres database and upload to Heroku.
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.