I'm trying to connect my website with a database using PHP. My website is currently displaying this error:
SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
This is my .env file config:
DB_DRIVER=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_NAME=my_db_name
DB_USER=root
DB_PASS=my_db_password
DB_CHARSET=utf8mb3
DB_COLLATION=utf8mb3_general_ci
I created that database manually with MySQL command line and I can establish connection with it with navicat 15 using the credentials I established in MySQL command line. But for some reason my website cant connect to the database. I want it to be able to connect to the database so my website is usable. Thanks in advance