登录mysql输入以下命令:

-- 选择mysql数据库:
use mysql
-- laremehpe是登录用户名
ALTER USER 'laremehpe'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
-- laremehpe -> 用户名, 123456 -> 密码
ALTER USER 'laremehpe'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';
-- 刷新:
flush privileges;
 

 

 posted on 2023-11-16 10:50  laremehpe  阅读(13)  评论(0编辑  收藏  举报