Baidu search one search, one-click fool installation.
After the installation is complete, enter 127.0.0.1 in the browser, and the following page will appear:
But cannot access phpmyadmin and sqlbuddy
After checking the information, it was found that mysql did not set a password when it was just installed.
Then first enter mysql to set a password. User information is located in the user table in the mysql database.
The method is
①打开WAMP的mysql控制台,提示输入密码,开始密码为空,直接按回车
②输入【use mysql】,控制台提示【Database changed】
③输入【update user set password=PASSWORD('要修改的密码') where user='root';】,
控制台提示【Query OK,XXXXXXXXX】
④最后输入【flush privileges】,提交
⑤输入【quit】,退出。
⑥在目录wamp\apps下找到phpmyadmin文件夹下的【config.inc.php】文件,
修改【$cfg['Servers'][$i]['password'] = ''】;为【$cfg['Servers'][$i]['password'] = '要修改的密码';】。
重新启动服务即可
Reference source WampServer to modify MySQL password
After the modification, it was found that it was not type, and it was still like this.
Later discovered that such a modification can be accessed? ? ?
The $ cfg [ 'Servers'] [ $ i] [ 'host'] = 'localhost'; change $ cfg [ 'Servers'] [ $ i] [ 'host'] = '127.0.0.1'; to.
After opening, the page is:
After checking some information, I feel that there is no difference between these two things. What caused it?
Opened the database and found these three users:
It is found that root has two hosts, one is localhost and the other is 127.0.0.1. After consulting the information, it is found that the two are different when connected.
localhost uses socket connection, and 127.0.0.1 uses tcp connection.
The article can refer to the solution that MySQL cannot connect to the database through localhost
The difference between localhost and 127.0.0.1
In addition, there are a few articles on the configuration page to learn a lot
PHP cannot connect to MySQL solution summary
Detailed explanation of PHPMyadmin configuration file (configuration)
About phpMyAdmin "Cookies must be enabled to log in" solution
But in the end, no way to use socket connection under windows was found