Home > Database > Mysql Tutorial > body text

How to Fix \'Access Denied\' Errors When Connecting to phpMyAdmin as Root?

Barbara Streisand
Release: 2024-11-23 06:59:19
Original
307 people have browsed it

How to Fix

Resolving Access Denied Issue for phpMyAdmin Root User

When using phpMyAdmin with WAMP Server, you may encounter an access denied error while connecting as 'root'@'localhost'. This error occurs after modifying the root user's password in phpMyAdmin and often persists even after reverting the password changes.

To resolve this issue without reinstalling WAMP, follow these steps:

  1. Navigate to the phpMyAdmin configuration file: C:wampappsphpmyadmin3.5.1config.inc.php
  2. Locate the following line:

    $cfg['Servers'][$i]['password'] =";
    Copy after login
  3. Replace the empty password (quoted double-semicolon) with the root password you wish to use:

    $cfg['Servers'][$i]['password'] = 'YourRootPassword';
    Copy after login
  4. Save the config.inc.php file.

After making this change, restart WAMP Server and access phpMyAdmin using 'localhost/phpmyadmin'. You should now be able to connect to the MySQL server without encountering the access denied error.

The above is the detailed content of How to Fix \'Access Denied\' Errors When Connecting to phpMyAdmin as Root?. 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