UBUNTU MYSQL 5.7+ 重置root密码

前端之家收集整理的这篇文章主要介绍了UBUNTU MYSQL 5.7+ 重置root密码前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

UBUNTU MysqL 5.7+ 重置root密码

登录MysqL 服务器,

mkdir /var/run/MysqLd; sudo chown MysqL /var/run/MysqLd

MysqLd_safe --skip-grant-tables &

MysqL -u root

重置密码。

UPDATE MysqL.user
    SET authentication_string = PASSWORD('MyNewPass'),password_expired = 'N'
    WHERE User = 'root' AND Host = 'localhost';
FLUSH PRIVILEGES;

参考:

https://dev.MysqL.com/doc/refman/5.7/en/resetting-permissions.html

http://askubuntu.com/questions/878652/unable-to-reset-MysqL-root-password-tried-everthing

https://support.rackspace.com/how-to/MysqL-resetting-a-lost-MysqL-root-password/

原文链接:/ubuntu/354553.html

猜你在找的Ubuntu相关文章