当前位置:网站首页>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 )
边栏推荐
- ES7 easy mistakes in index creation
- Go practice -- design patterns in golang's singleton
- Communication - how to be a good listener?
- 2022.DAY592
- "C and pointer" - Chapter 13 function of function pointer 1 - callback function 1
- Simpleitk learning notes
- mysql启动报错:The server quit without updating PID file几种解决办法
- Latest version of source insight
- Talk about how to use p6spy for SQL monitoring
- Redis cannot connect remotely.
猜你喜欢

Notepad++ wrap by specified character

Pessimistic lock and optimistic lock of multithreading
![[together Shangshui Shuo series] day 7 content +day8](/img/fc/74b12addde3a4d3480e98f8578a969.png)
[together Shangshui Shuo series] day 7 content +day8

Altaro o365 total backup subscription plan

【一起上水硕系列】Day 7 内容+Day8

Redis使用Lua脚本简介

Primary school campus IP network broadcasting - Design of primary school IP digital broadcasting system based on campus LAN

kubernetes资源对象介绍及常用命令(五)-(ConfigMap)

Error 1045 (28000) occurs when Linux logs in MySQL: access denied for user 'root' @ 'localhost' (using password: yes)

中职网络子网划分例题解析
随机推荐
ninja: build stopped: subcommand failed.
Go practice -- use redis in golang (redis and go redis / redis)
redis 遇到 NOAUTH Authentication required
期末复习(Day2)
Niuke JS separator
聊聊如何利用p6spy进行sql监控
Altaro o365 total backup subscription plan
Win10 install pytullet and test
Xaml gradient issue in uwp for some devices
How do I migrate my altaro VM backup configuration to another machine?
谷歌 | 蛋白序列的深度嵌入和比对
SimpleITK学习笔记
2022.7.2 simulation match
Linux登录MySQL出现ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)
Gan network thought
Beaucoup de CTO ont été tués aujourd'hui parce qu'il n'a pas fait d'affaires
Why should we rewrite hashcode when we rewrite the equals method?
The request database reported an error: "could not extract resultset; SQL [n/a]; needed exception is org.hibernate.exception.sqlgram"
今天很多 CTO 都是被干掉的,因为他没有成就业务
Interview question -- output the same characters in two character arrays