当前位置:网站首页>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 )
边栏推荐
- Source insight operation manual installation trial
- Notepad++ wrap by specified character
- Deep embedding and alignment of Google | protein sequences
- Final review (Day6)
- 期末复习DAY8
- 一起上水碩系列】Day 9
- How do I migrate my altaro VM backup configuration to another machine?
- How to install and configure altaro VM backup for VMware vSphere
- [written examination question analysis] | | get [sizeof and strlen] [pointer and array] graphic explanation + code analysis
- @Autowired 导致空指针报错 解决方式
猜你喜欢
期末复习(Day5)
Redis使用Lua脚本简介
Deep embedding and alignment of Google | protein sequences
Differences among bio, NiO and AIO
谷歌 | 蛋白序列的深度嵌入和比对
Disassembly and installation of Lenovo r7000 graphics card
[Shangshui Shuo series together] day 10
Notepad++ wrap by specified character
Apache+PHP+MySQL环境搭建超详细!!!
How to set up altaro offsite server for replication
随机推荐
[together Shangshui Shuo series] day 7 content +day8
2022.DAY592
ROS Compilation Principle
[set theory] relational closure (reflexive closure | symmetric closure | transitive closure)
Source insight automatic installation and licensing
Go practice -- use redis in golang (redis and go redis / redis)
Troubleshooting of 32GB Jetson Orin SOM failure to brush
2022.6.30DAY591
Common interview questions of microservice
Go practice -- factory mode of design patterns in golang (simple factory, factory method, abstract factory)
mysql启动报错:The server quit without updating PID file几种解决办法
请求数据库报错:“could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGram
獲取並監控遠程服務器日志
[written examination question analysis] | | get [sizeof and strlen] [pointer and array] graphic explanation + code analysis
Ensemble, série shuishu] jour 9
(subplots usage) Matplotlib how to draw multiple subgraphs (axis field)
Final review (Day2)
Brief introduction of realsense d435i imaging principle
Hotel public broadcasting background music - Design of hotel IP network broadcasting system based on Internet +
2022.DAY592