Home > Database > Mysql Tutorial > body text

Why Does \'localhost/phpmyadmin/\' Fail While \'127.0.0.1/phpmyadmin/\' Works, and How Can I Fix the \'Access Denied\' Error?

Mary-Kate Olsen
Release: 2024-11-22 05:58:13
Original
378 people have browsed it

Why Does

How to Resolve "Access denied for user 'root'@'localhost' for phpMyAdmin

This issue arises when you attempt to access phpMyAdmin via "localhost/phpmyadmin/" but encounter an error stating "Access denied for user 'root'@'localhost' (using password: NO)." Surprisingly, accessing it via "127.0.0.1/phpmyadmin/" seems to work without any issues.

To resolve this problem, delve into your config.inc file located at "C:wampappsphpmyadmin3.5.1." Specifically, seek the line "$cfg['Servers'][$i]['password'] =" and replace it with "$cfg['Servers'][$i]['password'] = 'Type your root password here'." Ensure that you input the correct root password in place of the placeholder "Type your root password here."

By implementing this change, you will restore the access privileges for the root user to their default state, allowing you to access phpMyAdmin seamlessly from both "localhost/phpmyadmin/" and "127.0.0.1/phpmyadmin/" without encountering the aforementioned access denied error message.

The above is the detailed content of Why Does \'localhost/phpmyadmin/\' Fail While \'127.0.0.1/phpmyadmin/\' Works, and How Can I Fix the \'Access Denied\' Error?. 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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template