linux下的mysql5.7忘记密码
[root@iz09a32x1sghz3z ~]# vi /etc/my.cnf
[root@iz09a32x1sghz3z ~]# service mysqld restart
用root账号登录: [root@iz09a32x1sghz3z ~]# mysql -u root
使用mysql中的mysql数据库: mysql> use mysql;
修改密码: update user set authentication_string = password("szfore_68638") where user="root" ;
刷新数据库: flush privileges;
退出: quit;
注意:mysql5.7的user表中的password字段已经改成了authentication_string 字段了。
这时候,需要输入的命令是update user set authentication_string = password("szfore_68638") where user="root" ;
[root@iz09a32x1sghz3z ~]# service mysqld restart
如对本文有疑问, 点击进行留言回复!!
Error 1390: Prepared statement contains too many placeholders
MySQL中limit与limit_offset区别及使用方法
网友评论