当前位置:网站首页>MySQL8版本免安装步骤教程
MySQL8版本免安装步骤教程
2022-07-04 12:48:00 【芝兰生于深谷】
MySQL8版本免安装步骤教程
1、下载Mysql8免安装包
网址:MySQL :: Download MySQL Community Server
2、解压
3、配置环境变量
4、修改my.ini文件
[mysqld]
# 设置3306端口
port=3306
# 设置mysql的安装目录
basedir=D:\MySql\mysql-8.0.22-winx64
# 设置mysql数据库的数据的存放目录
datadir=D:\MySql\mysql-8.0.22-winx64\Data
# 允许最大连接数
max_connections=200
# 允许连接失败的次数。
max_connect_errors=10
# 服务端使用的字符集默认为utf8mb4
character-set-server=utf8mb4
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
# 默认使用“mysql_native_password”插件认证
#mysql_native_password
default_authentication_plugin=mysql_native_password
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8mb4
[client]
# 设置mysql客户端连接服务端时默认使用的端口
port=3306
default-character-set=utf8mb4
5、初始化数据库并安装、登陆数据库
先以管理员身份打开命令提示符(cmd)
1、初始化数据库
生成初始密码,是[email protected]后的字符,我们需要记下来,后面用到。
# 路径一定要在安装文件夹
mysqld --initialize --console
2、安装MySQL服务
# mysqld --install 服务名,此处⽤mysql8作为服务名
mysqld --install mysql8
3、启动服务
# net start 服务名
net start mysql8
4、登录MySQL
使⽤默认分配的密码(即初始密码)进⾏登录
mysql -uroot -p初始密码
5、修改root密码
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password
BY 'xxx'; xxx是你⾃⼰定义的密码。
刷新
flush privileges;
6、重新登录
新密码也能成功登录!
边栏推荐
- [cloud native | kubernetes] in depth understanding of ingress (12)
- CA: efficient coordinate attention mechanism for mobile terminals | CVPR 2021
- Oracle was named the champion of Digital Innovation Award by Ventana research
- C foundation in-depth learning II
- Don't turn down, three sentences to clarify the origin of cross domain resource request errors
- 光环效应——谁说头上有光的就算英雄
- 2022g3 boiler water treatment examination question simulation examination question bank and simulation examination
- OPPO Find N2产品形态首曝:补齐各项短板
- Xilinx/system-controller-c/boardui/ unable to connect to the development board, the solution of jamming after arbitrary operation
- Three schemes to improve the efficiency of MySQL deep paging query
猜你喜欢
CTF competition problem solution STM32 reverse introduction
MySQL 45 lecture - learn the actual combat notes of MySQL in Geek time 45 lecture - 06 | global lock and table lock_ Why are there so many obstacles in adding a field to the table
Source code compilation and installation of MySQL
2022年起重机械指挥考试模拟100题模拟考试平台操作
. Net delay queue
高质量软件架构的唯一核心指标
苹果5G芯片研发失败:继续依赖高通,还要担心被起诉?
How to choose a technology stack for web applications in 2022
Personalized online cloud database hybrid optimization system | SIGMOD 2022 selected papers interpretation
结合案例:Flink框架中的最底层API(ProcessFunction)用法
随机推荐
面试拆解:系统上线后Cpu使用率飙升如何排查?
安装trinity、解决报错
Flet tutorial 03 basic introduction to filledbutton (tutorial includes source code) (tutorial includes source code)
硬件基础知识-二极管基础
担心“断气” 德国正修改《能源安全法》
Detailed explanation of Fisher information quantity detection countermeasure sample code
忠诚协议是否具有法律效力
分布式BASE理论
Lick the dog until the last one has nothing (state machine)
XILINX/system-controller-c/BoardUI/无法连接开发板,任意操作后卡死的解决办法
MySQL 45 lecture - learn the actual combat notes of MySQL in Geek time 45 lecture - 06 | global lock and table lock_ Why are there so many obstacles in adding a field to the table
C语言个人通讯录管理系统
CA: efficient coordinate attention mechanism for mobile terminals | CVPR 2021
CANN算子:利用迭代器高效实现Tensor数据切割分块处理
30: Chapter 3: develop Passport Service: 13: develop [change / improve user information, interface]; (use * * * Bo class to accept parameters, and use parameter verification)
XML入门三
C language staff management system
博士申请 | 西湖大学学习与推理系统实验室招收博后/博士/研究实习等
WPF double slider control and forced capture of mouse event focus
2022g3 boiler water treatment examination question simulation examination question bank and simulation examination