I'm trying to run:
php artisan migrate:install
But I'm getting:
[PDOException]
SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO)
This is my .env file:
APP_ENV=local
APP_DEBUG=true
APP_KEY=XXXX
APP_URL=http://localhost
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=dbname
DB_USERNAME=root
DB_PASSWORD=
But I can access the database with MySQL Workbench:
hostname: 127.0.0.1
port: 3306
username: root
password:
How can I fix this?