適用于可以登錄進(jìn)入mysql數(shù)據(jù)庫,想修改密碼或者提示密碼過期
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement
如果忘記密碼可以看Linux系統(tǒng)MySQL忘記登錄密碼-CSDN博客這篇文章
方法一:
use mysql;
update user set password=password('123456') where user='root'; # mysql5.7之前
update user set authentication_string=password('123456') where user='root'; # mysql5.7之后
flush privileges;
方法二:
set password for 'root'@'localhost' = password('123456');
方法三:
mysqladmin -u用戶名 -p舊的密碼 password 新密碼
方法四:
ALTER USER USER() IDENTIFIED BY 'Hu@12345'; # 5.7.6及之后
SET PASSWORD = PASSWORD('Hu@12345'); # 5.7.6之前
如果提示:ERROR 1819 (HY000): Your password doesnot satisfy the current policy requirements文章來源:http://www.zghlxwxcb.cn/news/detail-787908.html
密碼需要滿足8字符以上、大小寫、特殊字符、數(shù)字等復(fù)雜度限制文章來源地址http://www.zghlxwxcb.cn/news/detail-787908.html
到了這里,關(guān)于MySQL修改登錄密碼的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!