因为c盘爆满,wamp重新装的g盘。
1.将mysql.ini里面的一行
;skip-grant-tables
行头的分号去掉,表示去掉注释
2.找到wamp的安装目录,然后找到mysql的目录下面的bin文件夹,命令行运行mysql -uroot
这样就可以跳过密码验证
3.运行use mysql;
运行update user set authentication_string=password("这里是你的密码") where user='root'
4.修改wamp64\apps\phpmyadmin4.7.9/config.inc.php
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '这里是你的数据库密码';
5.重启wamp 的所有服务
6.最后要记得将
;skip-grant-tables的分号要加上,不然phpMyAdmin是无法创建数据库的