I tried deploying my project to an AWS EC2 server but when I tried to run php artisan migrate
I am getting the following error.
PDOException::("SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO)")
PDO::__construct("mysql:host=127.0.0.1;port=3306;dbname=myDb", "root", "", [])
The following is my .env file:
PP_NAME="MyProject"
APP_ENV=local
APP_KEY=base64:UTBgGqkc11OYbnGGJVe32xFluhFeNw288oH0UcmMYqU=
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=myDb
DB_USERNAME=root
DB_PASSWORD=
composer dump-autoload
and thenphp artisan migrate
using password: NO
because it is looking for the password.