Reset Root Password
Ensure that you are using the correct username and password combination. In XAMPP, default credentials are often ‘root’ with a blank password.
Steps to Reset Root Password:
Step 1: Locate the config.inc.php file:
Navigate to the directory where XAMPP is installed on your system. Inside the XAMPP directory, find the phpMyAdmin folder( by default C:/xampp/phpMyAdmin).
Step 2: Open config.inc.php in a text editor:
Right-click on config.inc.php and choose to open it with a text editor like Notepad or Visual Studio Code.
Step 3: Find the line with $cfg[‘Servers’][$i][‘password’]:
Use the search function of your text editor to locate the line that sets the password for the MySQL server. The line should look something like this:
$cfg['Servers'][$i]['password'] = 'your_password';
Replace ‘your_password’ with your desired new password enclosed within single quotes.
Step 4: Save the changes:
After updating the password, save the config.inc.php file.
Step 5: Restart Apache server:
To apply the changes, you’ll need to restart the Apache server. this will Fix your error.
How to Fix Access Denied for User ‘root’@’localhost’ in MySQL
In MySQL, encountering the “Access Denied for User ‘root’@’localhost’ “ error typically occurs when there is an issue with the user privileges or incorrect credentials. This article explores the step-by-step process to troubleshoot and fix this error.
To solve the “Access Denied for User ‘root’@’localhost’ “ error, try resetting the root password or granting certain privileges to the user. The step-by-step guide to try these solutions is explained further in the article.