# 初始化数据文件 mysqld --initialize-insecure --user=mysql; # 安装 mysqld –install # 启动 net start mysql # 登录 mysql -uroot -p # 更改root密码(密码为123456) update mysql.user set authentication_string=password('123456') where user='root' and Host = 'localhost'; # 刷新权限 flush privileges; # 退出MySQL命令行 exit # 停止 net stop mysql # 再次启动 net start mysql