mysql忘记密码修改
mysql忘记密码修改
-- 忘记密码,my.cnf配置如下,再去不用密码登录mysql,然后修改密码
-- skip-grant-tables
use mysql
update user set password=password('1qaz2WSX!@') where user='root';
flush privileges;
-- 5.7、8.0后改密码
update user set authentication_string=password("DElu_2023911#") where user='root';
alter user 'root'@'%' identified with mysql_native_password by '1qaz2WSX-=';
flush privileges;

浙公网安备 33010602011771号