Mysql 忘记密码
linux下mysql8.0重置密码的方法
过程是先设置无密码登录, 把root的密码设为空字符, 在取消无密码登录, 再登录root, 再执行重置密码动作无密码登录mysql
systemctl set-environment MYSQLD_OPTS="--skip-grant-tables";
systemctl restart mysqld
mysql 回车即可
update mysql.user set authentication_string='' where User='root';
ALTER USER 'root'@'localhost' IDENTIFIED BY 'Abc123456!';