jeudi 26 octobre 2017

Laravel 5.1. cannnot run artisan commands

I am using Laravel 5.1 and I cannot run any artisan commands.

I uploaded my project to our live server with PHP5.5.22 CLI version.

everytime I run artisan commands I am getting this error SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (146)

I changed the configuration on my .env and config/database.php files to point to our MySQL server.

.env file

DB_CONNECTION=mysql
DB_HOST=****.sddb0040291787.*****
DB_PORT=3306
DB_DATABASE=sddb0040291787
DB_USERNAME=sddbMTcyNjEy
DB_PASSWORD=**********

config/database.php

'mysql' => [
        'driver'    => 'mysql',
        'host'      => env('DB_HOST', '****.sddb0040291787.*****'),
        'database'  => env('DB_DATABASE', 'sddb0040291787'),
        'username'  => env('DB_USERNAME', 'sddbMTcyNjEy'),
        'password'  => env('DB_PASSWORD', '**********'),
        'charset'   => 'utf8',
        'collation' => 'utf8_unicode_ci',
        'prefix'    => '',
        'strict'    => false,
    ],

even php artisan config:cache command doesn't work and returns same error.

Appreciate any help. Thanks guys!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire