Ad

Error "A Database Is Required To Access The Back-end" When Deploying To A Remote Server

- 1 answer

On my local machine, I've developed a project with OCTOBER CMS. All good, I can go to backend cms and so on. When I'm deploying on a hosting server, everything is ok, except the backend cms. It keeps showing this to me:

A database is required to access the back-end. Check the database is configured and migrated before trying again.

My .env file in that server has the changes of the database from the hosting server.

I've also tried to modify the config/database.php with the new credentials but without success.

Ad

Answer

these are few possible solutions to this:

  • make sure the configuration is correct in file config/database.php
  • make sure the database is created
  • change localhost to 127.0.0.1 if it didn't work
  • clear the cache by running the command php artisan config:clear
Ad
source: stackoverflow.com
Ad