1.cmd管理员进入mysql\bin目录。
2.初始化mysql: mysqld --initialize
3.安装mysql服务:mysqld --install
4.启动服务:net start mysql (初次登陆密码在data目录'.err'文件‘root@localhost’后,之后修改密码)
5.登录:mysql -uroot -p[密码]
6.修改加密规则: alter user 'root'@'localhost' identified by 'password' password expire never
7.修改密码: alter user 'root'@'localhost' identified with mysql_native_password by '[密码]'
8.登出:ctrl+Z
9.停止服务:net stop mysql