I have Laravel 5.8 installed on Ubuntu 16.04. I have MySql. My .env file:
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=mydb
DB_USERNAME=myuser
DB_PASSWORD=aaaa
My config/database.php file:
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'mydb'),
'username' => env('DB_USERNAME', 'myuser'),
'password' => env('DB_PASSWORD', 'aaaa'),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
],
I can log in into mysql with user myuser@localhost and password aaaa using command mysql -u myuser -p
and in phpmyadmin. I did these commands:
php artisan config:clear
php artisan cache:clear
php artisan config:cache
But I still have error in my website:
SQLSTATE[HY000] [1045] Access denied for user 'myuser'@'localhost' (using password: YES)
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2ONGPcX
via IFTTT
Aucun commentaire:
Enregistrer un commentaire