码迷,mamicode.com
首页 > 数据库 > 详细

MySQL更改密码

时间:2019-12-26 11:34:17      阅读:66      评论:0      收藏:0      [点我收藏+]

标签:root   word   http   mys   忘记   star   ati   tar   更改密码   

键入  mysql -u root -p  登录成功,如若已经忘记密码,查看这篇教程https://www.cnblogs.com/shyw/p/12056493.html

键入  use mysql

键入  update mysql.user set authentication_string=password(‘123456‘) where user=‘root‘;       设置数据库密码  适用于mysql 5.7版本

重启服务(要切换到mysql的bin目录!!!!!!!!)   

    net stop mysql;

    net start mysql;

MySQL更改密码

标签:root   word   http   mys   忘记   star   ati   tar   更改密码   

原文地址:https://www.cnblogs.com/shyw/p/12100939.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!