cmd 进入mysql安装路径的bin目录执行如下: c:>mysql -u root mysql>set password for ‘root’@‘localhost’=password(‘newpasswd’);