jeudi 26 novembre 2015

Connect to MySQL DataBase with Laravel 5.1 and Cloudways

I'm trying cloudways as server to deploy my Laravel application on it. Everythings seems to work, except that I can't connect to Database. When I try to authenticate, I get this error :

SQLSTATE[HY000] [2003] Can't connect to MySQL server on '***.***.**.***' (4)

There is my .env files :

DB_HOST=localhost
DB_DATABASE=ynjrzmznup
DB_USERNAME=ynjrzmznup
DB_PASSWORD=**********

I tried to reach it using terminal :

$ mysql -u ynjrzmznup -h localhost -p

And i got this:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2562
Server version: 5.5.46-0+deb7u1 (Debian)

Everything work on my local environment. I can reach every public files on the server, but when I try to authenticate, I can't because the server is unable to get data from MySQL.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire