终端输入 mysqladmin -u root -p password “新密码” 回车 Enter password: 【输入原来的旧密码】 刚安装的没有旧密码直接回车就可以了。 进入mysql set password for root@localhost = password(‘root’)