到官网下载需要的版本

https://dev.mysql.com/downloads/mysql/

添加bin目录到环境变量,不添加也可以,但就是每次都要切换到bin目录去执行命令

 

mysqld --initialize 初始化data目录

mysqld --install 安装到系统服务

net start mysql 启动服务

 

在data目录找到   你的计算机名.err 文件,用记事本打开,找到

A temporary password is generated for root@localhost: ********

其中的星号标识部分就是root用户密码

 

posted on 2021-04-29 15:08  lbnnbs  阅读(59)  评论(0编辑  收藏  举报