当前位置:网站首页>Installing mysql5.7 under Windows
Installing mysql5.7 under Windows
2022-06-28 08:10:00 【Record】
One 、 Configuration environment
- 1、 Unpack the installation package , In this article, extract to G:\mysql5.7.23 Under the table of contents
- 2、 This computer -> Right click -> attribute -> Advanced system setup -> environment variable , In system variable -> find Path-> edit , take mysql Add the installation path of ( Add ;G:\mysql5.7.23).

Two 、 To configure mysql
- 1、 stay mysql Installation directory , Create a new one my.ini The configuration file .

About my.ini The file configuration of is as follows :
[mysql]
# Set up mysql Client default character set
default-character-set=utf8
[mysqld]
# Set up 3306 port
port = 3306
# Set up mysql Installation directory
basedir=G:\mysql5.7.23
# Set up mysql Database data storage directory
datadir=G:\mysql5.7.23\data
# Maximum connections allowed
max_connections=200
# The character set used by the server defaults to 8 Bit coded latin1 Character set
character-set-server=utf8
# The default storage engine that will be used when creating a new table
default-storage-engine=INNODB
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
3、 ... and 、 Initialize and start Mysql
1、 Start as Administrator cmd window
2、 Get into mysql Installation directory

3、 install mysql service
mysqld -install
* Note that if the execution is completed mysqld -install The installation directory was not generated data file , To be implemented mysqld --initialize-insecure --user=mysql( If the build ignores this step )
If you execute mysqld --initialize-insecure --user=mysql Report errors
take my.ini Change the single slash after the path letter in the configuration file to double slash
basedir=G:\\mysql5.7.23
datadir=G:\\mysql5.7.23\data
- 4、 initialization mysql
mysqld –initialize
- 5、 start-up mysql
net start mysql
- 6、 initialization mysql password
mysql stay 5.7 Version above root By default, the user generates a temporary login password , The password is generated in the data directory .err In the file ; stay my.ini The data directory I wrote in the configuration file is :datadir= G:\mysql5.7.23\data
Then the initial password is found in this directory .

The part circled above is the login password
Four 、 Reset mysql password
Log in with the initialized login password mysql
After entering the client , You can change the password set password for [email protected] = password(' New password '); ( Don't forget the semicolon ~)
5、 ... and 、 Set up root Remote access rights
mysql> grant all privileges on *.* to 'root'@'%' identified by ' password ';
mysql> flush privileges;
have access to navicat for mysql Connect the test :
thus ,MySQL The installation is complete !
边栏推荐
- 图像翻译:UVCGAN: UNET VISION TRANSFORMER CYCLE-CONSISTENT GAN FOR UNPAIRED IMAGE-TO-IMAGE TRANSLATION
- 【学习笔记】线性基
- asp. Net datalist when there are multiple data displays
- Airflow2.x distributed deployment DAG execution failure log cannot be obtained normally
- cuda和cudnn和tensorrt的理解
- Chenglian premium products donated love materials for flood fighting and disaster relief to Yingde
- 设置网页的标题部分的图标
- Jacobian matrix J commonly used in slam
- Upgrade HDP spark to spark 2.4.8 without upgrading ambari
- In flood fighting and disaster relief, the city donated 100000 yuan of love materials to help Yingde
猜你喜欢

2022巴黎时装周儿童单元6.19武汉站圆满落幕

MySQL implements transaction persistence using redo logs

你了解TCP協議嗎(二)?

新唐NUC980使用记录:自制开发板(基于NUC980DK61YC)

Unity 获取当前物体正前方,一定角度、距离的坐标点

Airflow2.1.1 summary of the pits stepped on in actual combat!!

MySQL tablespace parsing

B_ QuRT_ User_ Guide(27)

In flood fighting and disaster relief, the city donated 100000 yuan of love materials to help Yingde

Soft exam -- software designer -- afternoon question data flow diagram DFD
随机推荐
HJ string sort
Jenkins' common build trigger and hook services (V)
Prometheus deployment alarm docking QQ mailbox
Conversion between HJ integer and IP address
Software testing and quality final review
Hj21 simple password
设置cmd的编码为utf-8
MySQL row format parsing
B_ QuRT_ User_ Guide(30)
asp. Net upload image path and image name
Soft test -- software designer -- database design of afternoon questions
Study notes 22/1/11
cuda和cudnn和tensorrt的理解
Activity隐式跳转
[JS] - [throttling and anti shake function]
B_ QuRT_ User_ Guide(27)
Flex layout
In flood fighting and disaster relief, the city donated 100000 yuan of love materials to help Yingde
Vagrant installation
How redis solves cache avalanche, breakdown and penetration problems