My env file as follow:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=admin_clrank
DB_USERNAME=admin_clranke
DB_PASSWORD=admin@123
i am getting the error and i have checked the username and password that are same.My website is in cpanel. config.php file is also delted.
Try to use username and password as follows with quotation. i have no idea how it worked, but it really worked for me after searching a lot.
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=admin_clrank
DB_USERNAME='admin_clranke'
DB_PASSWORD='admin@123'
Use console and artisan:
php artisan config:cache
This will clear cache configuration and then new settings will work.
it can be fixed by adding a ' single quote on database user and password
DB_DATABASE=admin_clrank
DB_USERNAME='admin_clranke'
DB_PASSWORD='admin@123'
like this. it will work fine for me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With