您的位置:首页 > 运维架构 > Linux

Linux 下mysql 忘记root密码,修改密码怎么做?在mysql.user 中并没有password字段,但是有authentication_string

2016-01-21 14:44 666 查看
第一步: vi /etc/my.cnf 在[mysqld] 下 增加 --skip-grant-tables

第二步: service mysql restart

第三步: shell>mysql 进入 控制台

4: use mysql

5: update user set authentication_string = password("123456") where user='root';
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: