https://dev.mysql.com/downloads/mysql/
以管理员身份启动cmd
mysqld --initialize --console
可设置环境变量 也可也不设置 设置后不用去安装目录bin去执行
mysqld -install
输入 net start mysql 或 sc start mysql
mysql -u root -p
输入生成密码
修改密码
alter user 'root'@'localhost' identified by '想要设置的密码';
重新启动
mysql -u root -p
参考:
https://blog.csdn.net/m0_62377066/article/details/122058079
https://www.jb51.net/article/228601.htm