Home > Database > Mysql Tutorial > How Do I Fix the \'Access denied for user \'root\'@\'localhost\'\' Error in phpMyAdmin?

How Do I Fix the \'Access denied for user \'root\'@\'localhost\'\' Error in phpMyAdmin?

DDD
Release: 2024-11-26 00:46:11
Original
872 people have browsed it

How Do I Fix the

Fixing Access Denied Error for 'Root' User in phpMyAdmin

In phpMyAdmin, when attempting to access databases using the 'root' user with 'localhost' host, an error may arise stating "Access denied for user 'root'@'localhost'...". This guide outlines a solution to this issue.

Within the WAMP Server installation, navigate to "C:wampappsphpmyadmin3.5.1". Open the "config.inc.php" file. Locate the line "$cfg['Servers'][$i]['password'] =";". Change this line to include the root password within single quotes:

$cfg['Servers'][$i]['password'] = 'Your_Root_Password';
Copy after login

Save the modified "config.inc.php" file and restart both Apache and MySQL services within WAMP Server.

Upon revisiting "localhost/phpmyadmin/", access to the databases should be restored, and the error message should no longer appear.

The above is the detailed content of How Do I Fix the 'Access denied for user 'root'@'localhost'' Error in phpMyAdmin?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template