Home > Database > phpMyAdmin > body text

How to change and reset WAMP's phpMyAdmin password

藏色散人
Release: 2021-05-18 16:40:12
forward
3819 people have browsed it

The following tutorial column of phpmyadmin will introduce to you how to modify and reset the phpMyAdmin password of WAMP. I hope it will be helpful to friends in need!

WAMP is Apache Mysql/MariaDB Perl/PHP/Python under Windows, commonly used to build dynamic websites or servers Open source software.
1. Download page: http://www.wampserver.com/en/ There are many installation tutorials on the Internet, they are basically the next step, so I won’t introduce them too much here.
2. Start after successful installation. The icon displays green to indicate normal startup. Displayed in yellow, the general port 80 is occupied, or MYSQL has been installed before, and there is a conflict. Because xamp has been installed before, it is always displayed in yellow after opening. After uninstalling, it can be used normally.

3. Change the password 1: Enter phpMyAdmin to change it directly. It will usually be successful, but there are also many unsuccessful cases, which are not very reliable;

(1) Click [User] in the phpMyAdmin interface, Change the passwords of all users named [root] in the user profile to [password to be changed]. To modify, click [Edit Permissions] and set a password.
(2) Find the [config.inc.php] file in the phpmyadmin folder under the directory wamp\apps,

修改【$cfg['Servers'][$i]['password'] = ''】;
为【$cfg['Servers'][$i]['password'] = '要修改的密码';】。
Copy after login
Copy after login

(3) Enter the directory and open D:/wamp/apps/phpmyadmin3 .5.1/libraries/config.default.php file,

修改$cfg['Servers'][$i]['password'] = '您修改的密码';
Copy after login

Restart wampserver. At this point, the password has been successfully changed and the service can be restarted.

But after many unsuccessful attempts, this method is not very reliable. Some people say this:
Since the password modified directly through the Phpmyadminmysql interface is in letain encoding, and the utf8 encoding is used when logging in, you cannot log in as long as you set a password for the user. Therefore, when setting the password, it can only be set through the mysql command line, and the key command set names utf8 is required; set the current mode to utf8 and then update the password, and then you can log in through the password.

4. Change password 2: Use WAMP’s MySql console to change it.

(1) Open the mysql console of WAMP, and it will prompt you to enter the password. The password will be blank at first, just press Enter
(2) Enter [use mysql], the console will prompt [Database changed]
(3) Enter [update user set password=PASSWORD('password to be modified') where user='root';]

Generally, this command is used by Baidu, but an error will be prompted, password unknown Wait;
Reason: After the version is updated, password becomes authentication_string.
Solution: Enter [update user set authentication_string=PASSWORD('Password to be modified') where user='root';]
At this time, the console prompts [Query OK, XXXXXXXXX]

(4) Finally enter [flush privileges] and press Enter
(5) Enter [quit] to exit.
(6) Find the [config.inc.php] file in the phpmyadmin folder under the directory wamp\apps,

修改【$cfg['Servers'][$i]['password'] = ''】;
为【$cfg['Servers'][$i]['password'] = '要修改的密码';】。
Copy after login
Copy after login

5 If you forget your password, you need to reset it:

(1) Add [skip-grant-tables] at the bottom of the [mysqlId] field of [my.ini] in file D:\wamp\wamp64\bin\mysql\mysql5.7.9 and restart the mysql service
(2) Enter the mysql console and change the password again.
(3) After changing the password, delete the [skip-grant-tables] added in [my.ini].
(4) Restart the service

The above is the detailed content of How to change and reset WAMP's phpMyAdmin password. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
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