K
K
kchauchon2017-07-25 01:47:05
Laravel
kchauchon, 2017-07-25 01:47:05

How to set up a database in Laravel when uploading to a hosting?

Hello!
Wrote a website in laravel. Transferred to hosting, changed DB settings in .env and config/database.php. But it throws a query exception SQLSTATE[HY000] [2002] Connection refused (SQL: select * from `articles` order by `id` desc). What to do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Twelfth Doctor, 2017-07-25
@verdex

What host do you have in your .env file?
This error says that the site cannot connect to the database (connection reset)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question