当前位置:网站首页>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、重新登录
新密码也能成功登录!
边栏推荐
- C语言课程设计题
- It is six orders of magnitude faster than the quantum chemical method. An adiabatic artificial neural network method based on adiabatic state can accelerate the simulation of dual nitrogen benzene der
- 上汽大通MAXUS正式发布全新品牌“MIFA”,旗舰产品MIFA 9正式亮相!
- Node の MongoDB安装
- Redis —— How To Install Redis And Configuration(如何快速在 Ubuntu18.04 与 CentOS7.6 Linux 系统上安装 Redis)
- E-week finance | Q1 the number of active people in the insurance industry was 86.8867 million, and the licenses of 19 Payment institutions were cancelled
- JVM series - stack and heap, method area day1-2
- In 2022, it will be es2022 soon. Do you only know the new features of ES6?
- Fs4056 800mA charging IC domestic fast charging power IC
- 嵌入式编程中五个必探的“潜在错误”
猜你喜欢
Distributed base theory
unity不识别rider的其中一种解决方法
Byte interview algorithm question
7 月数据库排行榜:MongoDB 和 Oracle 分数下降最多
Go 语言入门很简单:Go 实现凯撒密码
光环效应——谁说头上有光的就算英雄
The only core indicator of high-quality software architecture
Three schemes to improve the efficiency of MySQL deep paging query
结合案例:Flink框架中的最底层API(ProcessFunction)用法
分布式BASE理论
随机推荐
.Net之延迟队列
CA: efficient coordinate attention mechanism for mobile terminals | CVPR 2021
Secretary of Homeland Security of the United States: domestic violent extremism is one of the biggest terrorist threats facing the United States at present
Personalized online cloud database hybrid optimization system | SIGMOD 2022 selected papers interpretation
Haproxy high availability solution
Lick the dog until the last one has nothing (state machine)
Alibaba cloud award winning experience: build a highly available system with polardb-x
ASP.NET Core入门一
Interviewer: what is the internal implementation of hash data type in redis?
30:第三章:开发通行证服务:13:开发【更改/完善用户信息,接口】;(使用***BO类承接参数,并使用了参数校验)
SQL language
Node の MongoDB安装
数据库公共字段自动填充
How to choose a technology stack for web applications in 2022
逆向调试入门-PE结构-资源表07/07
Go zero micro service practical series (IX. ultimate optimization of seckill performance)
C#基础补充
. Net using redis
Five "potential errors" in embedded programming
Flet教程之 03 FilledButton基础入门(教程含源码)(教程含源码)