I am trying to upload website on cpanel. The following error is encountering
PDOException in Connector.php line 47: SQLSTATE[HY000] [1045] Access denied for user 'hassan'@'localhost' (using password: YES)
My .env file contains:
APP_ENV=local
APP_DEBUG=true
APP_KEY=4ZuW70AMILLsnvHkTJ1yraRoGqmx4Dzg
DB_HOST=localhost
DB_DATABASE=campaign
DB_USERNAME=hassan
DB_PASSWORD=password
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
and config/database.php as
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'database' => env('DB_DATABASE', 'campaign'),
'username' => env('DB_USERNAME', 'hassan'),
'password' => env('DB_PASSWORD', 'China125'),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => false,]
What might be wrong with it?