Support the ongoing development of Laravel.io →
Configuration Database Installation
Last updated 2 years ago.
0

In most cases, you execute your code on the same computer your database runs on. In that case localhost is the correct value. If I understand correctly, you execute code locally and wish to communicatie with a remote database. If true, don't connect to 'localhost' but to your remote server (e.g. yourdomain.com). Please check if hostgator allows remote database access. Not all hosters allow you to do so and certainly not by default.

Last updated 2 years ago.
0

You are correct, I am trying to connect to hostgator a remote database. I changed the 'host' value to http:www.flemzy.com and get this error after trying to run php artisan migrate

[PDOException]                                                               
  SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'http://www.flemzy.  
  com' (4) 
Last updated 2 years ago.
0

I found out the issue is I have to have ssh shell access in order to access the CLI utility on Hostgator's server. Hostgator only gives jail shell access which is limited. So this means that database migrations cannot be done with artisan but instead manually importing/exporting sql. If you have a VPS or Dedicated server you get root ssh access. I hope this will help someone in the future. Here is an article for reference if you do have root ssh access: Post

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

swgj19 swgj19 Joined 11 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.