当前位置:网站首页>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 !
边栏推荐
- asp. Net upload image path and image name
- 【学习笔记】最短路 +生成树
- Update pip to the latest version
- asp. Net registration page
- asp. Net error "/" server error in the application. String or binary data would be truncated. The statement...
- MySQL tablespace parsing
- Kubernetes cluster command line tool kubectl
- Chenglian premium products donated love materials for flood fighting and disaster relief to Yingde
- Doris学习笔记之介绍、编译安装与部署
- 关于如何在placeholder中使用字体图标
猜你喜欢
随机推荐
【js】-【DFS、BFS应用】-学习笔记
Activity implicit jump
Airflow2.x distributed deployment DAG execution failure log cannot be obtained normally
Upgrade HDP spark to spark 2.4.8 without upgrading ambari
Generation and verification of JWT token
MySQL installation and environment variable configuration
【学习笔记】差分约束
Es data export CSV file
22/02/14 study notes
ROS notes (09) - query and setting of parameters
Is it reliable for flush to register and open an account? Is it safe?
AI首席架构师8-AICA-高翔 《深入理解和实践飞桨2.0》
MySQL implements transaction persistence using redo logs
At 19:00 on Tuesday evening, the 8th live broadcast of battle code Pioneer - how to participate in openharmony's open source contribution in multiple directions
【学习笔记】模拟
The preliminary round of the sixth season of 2022 perfect children's model Foshan competition area came to a successful conclusion
Doris学习笔记之介绍、编译安装与部署
[JS] - [throttling and anti shake function]
Hj21 simple password
新唐NUC980使用记录:自制开发板(基于NUC980DK61YC)









