-- 修改密码
alter user meet@'%' identified with mysql_native_password by '123456';
-- 修改账户有效期
alter user 'meet'@'%' password expire interval 600 day;
报错处理:
ERROR 1396 (HY000): Operation ALTER USER failed for 'meet'@'%'
首先把账号解锁: alter user meet@'%' account unlock;
再把密码有效期改一下: alter user meet@'%' password expire never;
再把其他密码复制过来: update mysql.user set authentication_string='*DC99E491011F980233A0C6E33577D2BC2E0B464D' where user='meet';
最后修改用户密码: alter user meet identified with mysql_native_password by '123456';
最后测试登录成功:
[admin@db1 ~]$ mysql -u meet -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 267
Server version: 8.0.25
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
标签:处理过程,密码,user,mysql,meet,password,alter,账号密码 From: https://www.cnblogs.com/mjxi/p/17628228.html