windows安装mysql-8.0.35

打开cmd(以管理员身份运行),切换到mysql下的bin目录

mysqld --initialize

执行完毕之后,在data目录下会生成很多文件。

打开cmd(以管理员身份运行),切换到mysql下的bin目录,如果刚才的cmd没有关闭,可以继续
mysqld --install MySQL80

#install后面是服务的名字,我们这里以MySQL80作为mysql8.0的服务名

进入到安装的bin目录 执行 :

mysqld --console --skip-grant-tables --shared-memory

(注:这个窗口执行完之后不要关闭,重新起一个新的cmd窗口)

启动一个新的cmd窗口 执行 mysql -uroot -p 就能免密进入,提示输入密码时,直接enter

修改密码:

use mysql

update user set authentication_string='' where user='root'

如果这个字段有值,先置为空

flush privileges

刷新权限表

alter user 'root'@'localhost' identified by '123' 修改root 密码

使用命令行启动服务,

启动:net start MySQL80

停止:net stop MySQL80

相关推荐
yhole10 小时前
springboot三层架构详细讲解
spring boot·后端·架构
我科绝伦(Huanhuan Zhou)10 小时前
InnoDB Undo Log 深度解析:从原理到实现(基于 MySQL 8.0)
数据库·mysql
香香甜甜的辣椒炒肉10 小时前
Spring(1)基本概念+开发的基本步骤
java·后端·spring
程序员夏末11 小时前
【MySQL | 第三篇】 MySQL索引详解
数据库·mysql
白毛大侠11 小时前
Go Goroutine 与用户态是进程级
开发语言·后端·golang
ForteScarlet11 小时前
从 Kotlin 编译器 API 的变化开始: 2.3.20
android·开发语言·后端·ios·开源·kotlin
大阿明12 小时前
SpringBoot - Cookie & Session 用户登录及登录状态保持功能实现
java·spring boot·后端
Binary-Jeff12 小时前
Spring 创建 Bean 的关键流程
java·开发语言·前端·spring boot·后端·spring·学习方法
TlYf NTLE12 小时前
Spring Boot3.3.X整合Mybatis-Plus
spring boot·后端·mybatis
SHoM SSER12 小时前
Spring Boot性能提升的核武器,速度提升500%!
java·spring boot·后端