MySQL5.7 默认密码修改
MySQL5.7以上版本密码策略稍有改变,针对在windows系使用MySQL数据库的童鞋,如果想修改root用户密码,可使用如下方法 mysql 5.7.x 默认密码为空时,禁止登陆PhpMysqlAdmin的,修改如下:
首先到命令控制台
mysql -u root--skip-password //登录mysql
alter user'root'@'localhost'identified by 'root';
//如果报错用如下
alter user'root'@'127.0.0.1'identified by 'root';
//最后一步刷新生效
flush privileges;
最后root
用户的密码为root