当前位置:网站首页>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
- Shanghai daoning, together with American /n software, will provide you with more powerful Internet enterprise communication and security component services
- Niuke JS separator
- The request database reported an error: "could not extract resultset; SQL [n/a]; needed exception is org.hibernate.exception.sqlgram"
- 中职网络子网划分例题解析
- Altaro virtual machine replication failed: "unsupported file type vmgs"
- Calculation method of AUC
- 2022.6.30DAY591
- Simpleitk learning notes
- How do I migrate my altaro VM backup configuration to another machine?
猜你喜欢
Disassembly and installation of Lenovo r7000 graphics card
谷歌 | 蛋白序列的深度嵌入和比对
Congratulations to musk and NADELLA on their election as academicians of the American Academy of engineering, and Zhang Hongjiang and Fang daining on their election as foreign academicians
[branch and cycle] | | super long detailed explanation + code analysis + a trick game
[practical project] autonomous web server
[Shangshui Shuo series together] day 10
@Autowired 导致空指针报错 解决方式
6.23星期四库作业
Why should we rewrite hashcode when we rewrite the equals method?
Map的扩容机制
随机推荐
Progressive multi grasp detection using grasp path for rgbd images
Source insight automatic installation and licensing
Ansible firewall firewalld setting
【一起上水硕系列】Day 10
穀歌 | 蛋白序列的深度嵌入和比對
[set theory] relational closure (relational closure related theorem)
Redis使用Lua脚本简介
chromedriver对应版本下载
Covering Safari and edge, almost all mainstream browsers have realized webgl 2.0 support
EMD distance - example of use
Map的扩容机制
The request database reported an error: "could not extract resultset; SQL [n/a]; needed exception is org.hibernate.exception.sqlgram"
ROS Compilation Principle
mysql启动报错:The server quit without updating PID file几种解决办法
(perfect solution) how to set the position of Matplotlib legend freely
期末复习DAY8
Technical analysis of qianyuantong multi card aggregation router
kubernetes资源对象介绍及常用命令(五)-(ConfigMap)
Final review Day8
Calculation method of AUC