当前位置:网站首页>MySQL 5.7.32-winx64 installation tutorial (support installing multiple MySQL services on one host)
MySQL 5.7.32-winx64 installation tutorial (support installing multiple MySQL services on one host)
2022-07-03 05:39:00 【Manon stayup】
Every time you change the working environment, you should install it locally MySQL service , Also search the Internet for some installation methods . For future use , The installation method is recorded . Convenient for me , I hope it's convenient for you .
download
Official website address :https://downloads.mysql.com/archives/installer/
Download address :https://cdn.mysql.com/archives/mysql-5.7/mysql-5.7.32-winx64.zip
To configure my.ini
stay MySQL Root creation my.ini The configuration file .
The contents of the configuration file are as follows :
[mysqld]
# Set up 3306 port
port=3306
# Set up mysql Installation directory
basedir=F:\mysql-5.7.32-winx64
# Set up mysql Database data storage directory
datadir=F:\mysql-5.7.32-winx64\data
# Maximum connections allowed
max_connections=200
# Number of connection failures allowed .
max_connect_errors=10
# The character set used by the server defaults to utf8mb4
character-set-server=utf8mb4
# 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
#mysql_native_password
default_authentication_plugin=mysql_native_password
[mysql]
# Set up mysql Client default character set
default-character-set=utf8mb4
[client]
# Set up mysql The default port when the client connects to the server
port=3306
default-character-set=utf8mb4
Created in the root directory data Folder , To hold mysql The data of .
initialization MySQL
Switch to MySQL Of bin Catalog
Hold down 【Shift】 key , Right click the mouse in the blank space , choice 【 Open here Powershell Containers 】
Enter the following command in the container to initialize :
.\mysqld.exe --initialize --console
The figure below shows success , The default account number is root, The password is the content in the red box , Record here , We'll use that later ( My is :w*4MkvSw:hhj)
MySQL Service installation
Or the command box above , Enter the following command to install the service :
.\mysqld.exe --install [ service name ] -- The service name can be left blank , The default is mysql
The figure below shows success .
Because there are many installed in my computer mysql, So I added the service name here , To differentiate 
From the computer's 【 service 】 You can see the installed services in the box 
MySQL Service startup
There are two ways to start :
- adopt Windows Systematic 【 service 】 page , As shown in the figure above , Right click the installed mysql service , choice 【 start-up 】 that will do
- Start by command , Enter the following command :
net start [ service name ]
The results are shown in the following figure .
Log in and change the password
Still in the command box above , Enter the following command to log in
.\mysql.exe -u root -p
After entering, you will be asked to enter the password , Enter the password just recorded and press enter .
The following figure shows the successful login .
Enter the following command to change the password :
alter user 'root'@'localhost' identified by ' New password ';
The figure below shows success .
So far it's done MySQL Installation !
Create users and authorize
In the command box , Sign in mysql, Enter the following command to create a user
create user ' user name '@' host ' identified by ' password ';
Here's the picture , Indicates that the creation was successful 
Enter the following command to authorize
grant jurisdiction on database . Table name to ' user name '@' host ' with grant option;
- jurisdiction : User action permissions , Such as select, insert, update etc. , If you want to grant all permissions to use all
- database : The name of the database to authorize , If all databases use *
- Table name : Table name to authorize , If all tables use *
- user name : Login name of the target user
- host : The host address of the target user

One host is installed with multiple MySQL service
It's also very simple , The installation steps are exactly the same as those above , Just do the following two points :
- modify my.ini Port in the configuration file , Cannot conflict with the previous
- install MySQL The service , The service name should also be modified , Cannot conflict with the previous ( Recommend adding version information after the service name , To differentiate )
边栏推荐
- Es 2022 officially released! What are the new features?
- 在PyCharm中配置使用Anaconda环境
- 今天很多 CTO 都是被干掉的,因为他没有成就业务
- Altaro requirements for starting from backup on Hyper-V
- 期末复习(DAY6)
- Go practice -- use JWT (JSON web token) in golang
- Beaucoup de CTO ont été tués aujourd'hui parce qu'il n'a pas fait d'affaires
- Introduction to redis using Lua script
- 【一起上水硕系列】Day 10
- Altaro o365 total backup subscription plan
猜你喜欢

3dslam with 16 line lidar and octomap

Training method of grasping angle in grasping detection

Communication - how to be a good listener?

"250000 a year is just the price of cabbage" has become a thing of the past. The annual salary of AI posts has decreased by 8.9%, and the latest salary report has been released

今天很多 CTO 都是被干掉的,因为他没有成就业务
![[advanced pointer (1)] | detailed explanation of character pointer, pointer array, array pointer](/img/9e/a4558e8e53c9655cbc1a38e8c0536e.jpg)
[advanced pointer (1)] | detailed explanation of character pointer, pointer array, array pointer

Brief introduction of realsense d435i imaging principle

Deploy crawl detection network using tensorrt (I)

Altaro virtual machine replication failed: "unsupported file type vmgs"

Notepad++ wrap by specified character
随机推荐
Webrtc M96 release notes (SDP abolishes Plan B and supports opus red redundant coding)
Simpleitk learning notes
Jetson AgX Orin platform porting ar0233 gw5200 max9295 camera driver
Interview question -- output the same characters in two character arrays
【一起上水硕系列】Day 10
中职网络子网划分例题解析
@Solutions to null pointer error caused by Autowired
Progressive multi grasp detection using grasp path for rgbd images
2022.6.30DAY591
Why should we rewrite hashcode when we rewrite the equals method?
ES 2022 正式发布!有哪些新特性?
Get and monitor remote server logs
期末复习(Day2)
Disassembly and installation of Lenovo r7000 graphics card
Ansible firewall firewalld setting
Go practice -- design patterns in golang's singleton
【无标题】
Webrtc protocol introduction -- an article to understand ice, stun, NAT, turn
Final review (Day6)
6.23星期四库作业