use mysql alter user‘root‘@‘localhost‘ identified by ‘新密码‘; alter user‘root‘@‘localhost‘ identified with mysql_native_password by ‘新密码‘;
Linux环境下安装mysql8以后没有密码如何添加/修改
原文:https://www.cnblogs.com/wlx6/p/13071811.html