美文网首页
2021-02-07 mysql8.0.18 跳过密码验证

2021-02-07 mysql8.0.18 跳过密码验证

作者: 5A风景区 | 来源:发表于2021-02-07 11:58 被阅读0次

第一步:加--console --skip-grant-tables ,重新启动实例

/data1/mycode/mysql_debug/mysql-8.0.18/cmake-build-debug/runtime_output_directory/mysqld --console --skip-grant-tables 
image.png

第二步:登录启动后的实例 (只加-p参数,直接回车)

./cmake-build-debug/runtime_output_directory/mysql mysql -uroot -p
image.png

第三步:更新用户名密码

UPDATE mysql.user SET authentication_string='' WHERE user='root' and host='localhost';
image.png

第四步:重新启动不带--console --skip-grant-tables的实例

相关文章

网友评论

      本文标题:2021-02-07 mysql8.0.18 跳过密码验证

      本文链接:https://www.haomeiwen.com/subject/oohztltx.html