mysql 5.7.13重置root密码:
1.my.nin文件里在 [mysqld]下增加skip-grant-tables
2.cmd:net start mysql -mysql -use mysql; -UPDATE user SET authentication_string=PASSWORD(NEWPASSWORD) WHERE User=root; -FLUSH PRIVILEGES; -quit;
3.登陆
mysql 5.7.13重置root密码:
1.my.nin文件里在 [mysqld]下增加“skip-grant-tables”
2.cmd:net start mysql
->mysql
->use mysql;
->UPDATE user SET authentication_string=PASSWORD("NEWPASSWORD") WHERE User=‘root‘;
->FLUSH PRIVILEGES;
->quit;
3.登陆时,将my.min文件里的“skip-grant-tables”删除
登陆mysql -u用户 -p密码;
如果登陆进去报错1820,
登陆mysql -u -p 进去:输入mysql> SET PASSWORD = PASSWORD(‘123456‘);
创建用户:
create user yzkj;
update user set authentication_string=password("123456") where user="yzkj";
grant all on hzx.* to ‘yzkj‘@‘localhost‘;
create user text;
update user set authentication_string=password("123456") where user="text";
grant all on text.* to ‘text‘@‘localhost‘;
3.刷新数据库 (一定要记得刷新)
mysql>flush privileges;
quit
mysql -uyzkj -p
123456
成功!
Mysql5.7.13忘记密码及创建用户
标签:text 数据 5.7 start log 重置 class where string
本条技术文章来源于互联网,如果无意侵犯您的权益请点击此处反馈版权投诉
本文系统来源:http://www.cnblogs.com/Easonlou/p/6646848.html