I'm using Windows 11 with Uniform Server, a lightweight variant of XAMPP, and I've hit a roadblock while trying to access my application. Whenever I navigate to /test-site/install.php, I get an error that says, 'Access denied for user 'root@localhost'@'localhost' (using password: YES)'. I've checked my config.php file, where I'm defining the database credentials, and it looks like this:
define('DB_HOST', 'localhost');
define('DB_NAME', 'test');
define('DB_USER', 'root@localhost'); // should change this
define('DB_PASS', '1234'); // this is my password
define('DB_CHARSET', 'utf8mb4');
I double-checked that my root login info is correct in phpMyAdmin, but I'm still stuck. This project isn't critical; I'm just playing around to learn CMS development. Any insights on what I might be doing wrong?
3 Answers
It looks like the issue is that your database username is set incorrectly. You have 'root@localhost' as your DB_USER, but it should just be 'root'. Try changing that and see if it fixes the error.
I've seen this issue before! Double-check your database settings; specifically, make sure your DB_USER is simply 'root' without the @localhost. Also, ensure your database password is set correctly.
You're right about needing just 'root' for the DB_USER. The '@localhost' part isn't necessary there. Also, check your database password again to ensure it's correct!

Related Questions
How to Build a Custom GPT Journalist That Posts Directly to WordPress
Cloudflare Origin SSL Certificate Setup Guide
How To Effectively Monetize A Site With Ads