当前位置:网站首页>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 )
边栏推荐
- [practical project] autonomous web server
- PHP notes are super detailed!!!
- [together Shangshui Shuo series] day 7 content +day8
- 期末复习(DAY7)
- MySQL startup error: several solutions to the server quit without updating PID file
- 2022.7.2 模拟赛
- Intégration profonde et alignement des séquences de protéines Google
- (perfect solution) how to set the position of Matplotlib legend freely
- "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
- Gan network thought
猜你喜欢

Introduction to redis using Lua script

How to use source insight

Kubernetes resource object introduction and common commands (V) - (configmap)

"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

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

Apache+php+mysql environment construction is super detailed!!!

Apache+PHP+MySQL环境搭建超详细!!!

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

一起上水硕系列】Day 9

配置xml文件的dtd
随机推荐
Configure and use Anaconda environment in pycharm
(perfect solution) how to set the position of Matplotlib legend freely
谷歌 | 蛋白序列的深度嵌入和比对
Obtenir et surveiller les journaux du serveur distant
期末复习(DAY6)
Robot capture experiment demonstration video
今天很多 CTO 都是被幹掉的,因為他沒有成就業務
大二困局(复盘)
ninja: build stopped: subcommand failed.
Configure DTD of XML file
Azure file synchronization of altaro: the end of traditional file servers?
Capacity expansion mechanism of map
Error 1045 (28000) occurs when Linux logs in MySQL: access denied for user 'root' @ 'localhost' (using password: yes)
一起上水碩系列】Day 9
Get and monitor remote server logs
How to set up altaro offsite server for replication
(subplots usage) Matplotlib how to draw multiple subgraphs (axis field)
Es 2022 officially released! What are the new features?
Explanation of variables, code blocks, constructors, static variables and initialization execution sequence of static code blocks of Ali interview questions
一起上水硕系列】Day 9