mysql修改root密码

打开mysql命令终端 “MySQL 8.0 Command Line Client” ,然后输入密码进入。

紧接着输入如下命令,可将密码更改为 rootcgcl

alter user root@localhost identified by ‘rootcgcl’