当前位置:网站首页>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、重新登录
新密码也能成功登录!
边栏推荐
- 免费、好用、强大的轻量级笔记软件评测:Drafts、Apple 备忘录、Flomo、Keep、FlowUs、Agenda、SideNote、Workflowy
- Xilinx/system-controller-c/boardui/ unable to connect to the development board, the solution of jamming after arbitrary operation
- XML入门一
- 面试拆解:系统上线后Cpu使用率飙升如何排查?
- 上汽大通MAXUS正式发布全新品牌“MIFA”,旗舰产品MIFA 9正式亮相!
- PostgreSQL 9.1 soaring Road
- Source code compilation and installation of MySQL
- 2022KDD预讲 | 11位一作学者带你提前解锁优秀论文
- ASP. Net core introduction I
- C language dormitory management query software
猜你喜欢

MySQL45讲——学习极客时间MySQL实战45讲笔记—— 06 | 全局锁和表锁_给表加个字段怎么有这么多阻碍

Automatic filling of database public fields

如何在 2022 年为 Web 应用程序选择技术堆栈

2022 Shandong Province safety officer C certificate examination question bank and online simulation examination

Introduction to reverse debugging PE structure resource table 07/07

动画与过渡效果

基于链表管理的单片机轮询程序框架

Distributed base theory

How to choose a technology stack for web applications in 2022

SCM polling program framework based on linked list management
随机推荐
2022危险化学品经营单位主要负责人练习题及模拟考试
Alibaba cloud award winning experience: build a highly available system with polardb-x
The Secretary of Homeland Security warned immigrants "not to embark on a dangerous journey"
. Net delay queue
【R语言数据科学】:交叉验证再回首
Animation and transition effects
Source code compilation and installation of MySQL
After the game starts, you will be prompted to install HMS core. Click Cancel, and you will not be prompted to install HMS core again (initialization failure returns 907135003)
OpenHarmony应用开发之如何创建DAYU200预览器
CVPR 2022 | 大幅减少零样本学习所需的人工标注,提出富含视觉信息的类别语义嵌入(源代码下载)...
[cloud native | kubernetes] in depth understanding of ingress (12)
remount of the / superblock failed: Permission denied
Node の MongoDB 安装
Flet教程之 03 FilledButton基础入门(教程含源码)(教程含源码)
Node の MongoDB安装
C语言集合运算
CommVault cooperates with Oracle to provide metallic data management as a service on Oracle cloud
C语言职工管理系统
7 月数据库排行榜:MongoDB 和 Oracle 分数下降最多
FS4056 800mA充电ic 国产快充电源ic