Laravel – Connection refused (SELECT, INSERT)

  laravel

I have a program with Laravel, I made the .env configuration files to migrate the databases and it works, I created new tables and it works.

But when I do an INSERT or a SELECT it gives me connection error.

$dades['empleats'] = Empleats::paginate(5);

SQLSTATE[HY000] [2002] Connection refused (SQL: select count(*) as aggregate from empleats)

The user of the database has all the permissions

What could be the problem?

Thank’s

Source: Laravel

Leave a Reply