This plus a reset of xampp
Exactly what do you mean a reset of xampp.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Sorry if there is a clear answer on this, I searched all over before posting this...
background info:
So today I wanted to work on learning how to send mail through my app, and have Sparkpost configured and ready to send things for me. I updated my .env file and only edited the MAIL lines. At one point in configuring my app to send a test mail, I had to do either
php artisan config:clear
php artisan config:cache
php artisan cache:clear
This plus a reset of xampp nearly had my test email go out, but I realized I didn't have a security certificate to actually send the mail. That's fine, I'll figure it out later (will learn how to test mail locally first).
current issue:
So now I just try to log back into my app and I get:
SQLSTATE[HY000] [1045] Access denied for user 'USERNAME'@'localhost' (using password: YES) (SQL: select * from `users` where `email` = EMAIL_ADDRESS limit 1)
Then I try to run any artisan command:
PDOException::("SQLSTATE[HY000] [1045] Access denied for user 'USERNAME'@'localhost' (using password: YES)")
C:\xampp\htdocs\Project\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:68
2 PDO::__construct("mysql:host=127.0.0.1;port=3306;dbname=DATABASE", "USERNAME", "PASSWORD", [])
C:\xampp\htdocs\Project\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:68
I have absolutely no idea what to do here. I didn't knowingly change any settings for the database/MySQL. All threads I could find with these errors simply say to run the config:clear command and restart the server and everything should be fine, but it's not in my case.
Any ideas? I'm completely at a loss. Anything at all would be sincerely appreciated.
seems mysql is working OK from the command line too
It should work in laravel, are you sure you did not create a typo in that env file, or somewhere. Do you have more than one mysql installed.
Please or to participate in this conversation.