当前位置:网站首页>MySQL installation configuration 2021 in Windows Environment
MySQL installation configuration 2021 in Windows Environment
2022-07-07 14:53:00 【weixin_ forty-five million seven hundred and fifty thousand fou】
1、 First of all to enter MySQL :: Download MySQL Community Server Official website , Download installation package Extract to a specified directory

Here the decompression is assigned to D disc , And record the installation path

2、 Set up my.ini file

Copy the following content to the created my In file
basedir= Their own mysql Catalog
datadir=mysql Of data Stored directory
[mysqld]
# Set up 3306 port
port=3306
# Set up mysql Installation directory
basedir=D:\mysql\mysql-8.0.25-winx64
# Set up mysql Database data storage directory (data If there is no folder, it will be created automatically )
datadir=D:\mysql\mysql-8.0.25-winx64/data
# Maximum connections allowed
max_connections=200
# Number of connection failures allowed . This is to prevent someone from trying to attack the database system from the host
max_connect_errors=10
# The character set used by the server defaults to UTF8
character-set-server=utf8
# The default storage engine that will be used when creating a new table
default-storage-engine=INNODB
# By default “mysql_native_password” Plug in authentication
default_authentication_plugin=mysql_native_password
[mysql]
# Set up mysql Client default character set
default-character-set=utf8
What needs to be changed , Change the directory to your own directory, that is :
# Set up mysql Installation directory ---------- Is your file path -------------
basedir=D:\mysql-8.0.26-winx64
# Set up mysql Database data storage directory --------- Is your file path data The folder is created by itself
datadir=D:\mysql-8.0.26-winx64\data
eg:

3、 Run under the command of the administrator cmd, Execute the installation instructions
cd D:\mysql-8.0.26-winx64\bin Enter the directory of the operation
mysqld --initialize --console
mysqld install mysql

( The selected part in the figure is the initial login password , Write down the )

net start mysql start-up
mysql -uroot -p Connect mysql, Enter the password just now

Login success screen
4、 Change Password
After logging in here, we can change the password to our own password by executing the following instructions
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY ' New password ';

5、 Configure environment variables
1) Add system variables MYSQL_HOME The variable value is the initial mysql The installation path ( To /bin)

2) stay path Add %MYSQL_HOME% %MYSQL_HOME%\bin

6、mysql Basic operation
Display the version installation date
Display library
Create a selection database

Create database tables , Display table
Display table structure
Look up the information in the table and exit mysql
边栏推荐
- 安恒堡垒机如何启用Radius双因素/双因子(2FA)身份认证
- 半小时『直播连麦搭建』动手实战,大学生技术岗位简历加分项get!
- 【愚公系列】2022年7月 Go教学课程 005-变量
- 一文读懂数仓中的pg_stat
- 时空可变形卷积用于压缩视频质量增强(STDF)
- 数据库如何进行动态自定义排序?
- JSON解析实例(Qt含源码)
- Pandora IOT development board learning (HAL Library) - Experiment 12 RTC real-time clock experiment (learning notes)
- How to enable radius two factor / two factor (2fa) identity authentication for Anheng fortress machine
- C# 6.0 语言规范获批
猜你喜欢

Novel Slot Detection: A Benchmark for Discovering Unknown Slot Types in the Dialogue System

Computer win7 system desktop icon is too large, how to turn it down

13 ux/ui/ue best creative inspiration websites in 2022

Stm32cubemx, 68 sets of components, following 10 open source protocols

在软件工程领域,搞科研的这十年!

⼀个对象从加载到JVM,再到被GC清除,都经历了什么过程?

Five pain points for big companies to open source

15、文本编辑工具VIM使用

大厂做开源的五大痛点

Because the employee set the password to "123456", amd stolen 450gb data?
随机推荐
【愚公系列】2022年7月 Go教学课程 005-变量
比尔·盖茨晒48年前简历:“没你们的好看”
Full details of efficientnet model
Because the employee set the password to "123456", amd stolen 450gb data?
Discussion on CPU and chiplet Technology
Ascend 910 realizes tensorflow1.15 to realize the Minist handwritten digit recognition of lenet network
Yyds dry goods inventory # solve the real problem of famous enterprises: cross line
Simple use of websocket
防火墙基础之服务器区的防护策略
Huawei cloud database DDS products are deeply enabled
KITTI数据集简介与使用
13 ux/ui/ue best creative inspiration websites in 2022
潘多拉 IOT 开发板学习(HAL 库)—— 实验12 RTC实时时钟实验(学习笔记)
Ascend 910实现Tensorflow1.15实现LeNet网络的minist手写数字识别
2022年13个UX/UI/UE最佳创意灵感网站
What is cloud primordial? This time, I can finally understand!
Protection strategy of server area based on Firewall
ES日志报错赏析-maximum shards open
Read PG in data warehouse in one article_ stat
Jetson AGX Orin CANFD 使用