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

mysql 5.7.12 修改密码

时间:2016-06-02 09:55:34      阅读:196      评论:0      收藏:0      [点我收藏+]

标签:mysql root密码

mysql 5.7.12 修改密码

vim /etc/my.cnf

skip-grant-tables

/etc/init.d/mysqld restart

mysql 直接登陆

use mysql

update mysql.user set authentication_string=password(‘123456‘) where user=‘root‘;


修改完成以后注意把 skip-grant-tables 这行去掉不然一直不需要密码

mysql 5.7.12 修改密码

标签:mysql root密码

原文地址:http://liqilong2010.blog.51cto.com/3029053/1785348

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