The following tutorial column from phpmyadmin will introduce to you what to do if access to phpMyAdmin is denied. I hope it will be helpful to friends in need!
1. Environment:
XAMPP PhpStorm
2. phpMyAdmin configuration file path:
#3. The reason for the problem:
Enter the MySQL command line mode for the first time in the terminal to prompt the setting password. After setting, PHPMyAdmin is rejected in the browser.
4. Solution: (
clear password) (1) Enter mysql Terminal command mode:
#/Applications/XAMPP/XAMPPFILES/BIN/MySQL -u Root -P
Enter your password. Enter the mysql command mode (2) Clear the password:
# , if the method here does not work for you, you can try this: > UPDATE mysql.user SET authentication_string=PASSWORD('') WHERE User='root';Other steps are the same.)
(3) Refresh the permissions to make the configuration take effect
> FLUSH PRIVILEGES;
(4) Exit the mysql command mode:
Exit the mysql command mode: (5) Shut down mysqld
), just press Enter when prompted to enter the password. If there is no output, the shutdown is successful. (6) Repeat step (1) to test whether the password has been cleared:
$ /Applications/XAMPP/xamppfiles/bin/mysql -u root -p Press Enter directly. If Welcome to the... is prompted, the password has been cleared successfully. Start the mysql server (I use XAMPP), as shown in Figure 1:
## (7) Enter: localhost/phpmyadmin in the browser, and the access will be successful.
The above is the detailed content of What to do if access to phpMyAdmin is denied. For more information, please follow other related articles on the PHP Chinese website!