I am trying to deploy a Laravel 4.2 application on RedHat OpenShift. I have successfully transferred the code from GitHub but I am stuck at the database integration.
How do I run the migrations?
- I have created a new
mysql_openshift
database connection with OpenShift credentials and updated the same. - I have a migration file in the migrations folder.
- But on running the
php artisan migrate
i get the following error:
https://i.stack.imgur.com/nQbam.png
Please help!
The Laravel 4.2 QuickStart was updated 2 days ago. The QuickStart now automatically runs
php artisan migrate
when you deploy changes to OpenShift. I definitely recommend switching over to using the QuickStart or updating to the latest version.Anyways, the short answer to the problem you're seeing: your database is not configured properly in Laravel. See lines 60-70 of
app/config/database.php
in the Laravel 4.2 QuickStart for a reference on configuring the host/port connection info.