1.登录mysql mysql -u root -p 输入原密码 2.执行修改密码命令,把原来密码修改为root mysql> set password for root@localhost = password(‘root’);