您的位置:首页 > 数据库 > MySQL

mysql 5.7.12 修改密码

2016-06-02 03:32 387 查看
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 root