当前位置:网站首页>How on one machine (Windows) to install two MYSQL database
How on one machine (Windows) to install two MYSQL database
2022-07-31 08:29:00 【bsegebr】
How to install two MYSQL databases on one machine (windows)
Foreword:
The version mysql-8.0.22 is installed locally. Due to a project change, the version 8.0 needs to be reduced to 5.6.But in order not to affect the operation and use of other projects, two versions of mysql have to be installed on the same machine.This machine takes mysql5.6.40 and mysql8.0.22 as examples to describe the specific operation steps of installing two mysql databases on the same machine.The details are as follows:
Official website to download the installation package (decompressed version)
Download address:
https://downloads.mysql.com/archives/community/
Select the corresponding version to download according to the computer configuration
Unzip the archive to the relevant directory

Modify the configuration information of my-default.ini
Modify the content in the my-default.ini file to the following content, pay attention to modify the basedir, datadir, port parameter information, the port number cannot be the same as the current oneThe installation database port number is duplicated.[mysqld]
basedir = D:\mysql-5.6.40-winx64
datadir = D:\mysql-5.6.40-winx64\Data
port= 3307explicit_defaults_for_timestamp=true
character-set-server = utf8mb4
performance_schema_max_table_instances = 600
table_definition_cache = 400
table_open_cache = 256
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
> lower_case_table_names = 1
default_authentication_plugin=mysql_native_password
skip-log-bin[mysql]
default-character-set=utf8mb4[client]
default-character-set = utf8mb4
Note: There is no need to modify the file name information. Many people on the Internet say to modify the file name my.ini. After the actual measurement is completed, the service fails to start.The exact reason is unknown
- Configure environment variables
Advanced system settings—>Environment variables—>Path variables—>Edit—>New—>Copy the directory address where the bin folder is located—>OK


Open cmd command window as administrator

Go to the bin path
C:WINDOWSsystem32>d:
D:>cd mysql-5.6.40-winx64
D:mysql-5.6.40-winx64>cd bin
Execute the command mysqld install MySql2 --defaults-file=“D:mysql-5.6.40-winx64my-default.ini”, if Service successfully installed appears, it means that the service is installed successfully
D:mysql-5.6.40-winx64in>mysqld install MySql2 --defaults-file="D:mysql-5.6.40-winx64my-default.ini"
Service successfully installed.
Note: Because the mysql5.6 decompressed version has its own data related files, it is not necessary to execute the mysqld --initialize command;
The service name cannot be the same as the installed service name. The service named here is: MySql2
Execute the command net start MySql2 to start the service
D:mysql-5.6.40-winx64in>net start MySql2
The MySql2 service is starting.
The MySql2 service has been started successfully.Execute the mysql -u root -p command to log in to the database
D:mysql-5.6.40-winx64in>mysql -u root -p
Note: The default password of mysql5.6 version is empty, just press Enter when logging in;
When the machine uses the command to log in, it keeps reporting ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded: ò2μ¨μ£é£. If the relevant modification is made according to the online tutorial, the login fails, so I use Navicat instead.The tool is logged in, and the actual login is successful. As for why the command window login fails, the specific reason is unknown.
Open the task manager and you can see that there are two mysql services running.So far, the mysql5.6 version database configuration is complete.
Attached: mysql5.6.40 decompressed version
link: https://pan.baidu.com/s/1_EYeR4xOohNivQtVmw2Q4g
Extraction code: 3xqo
Let me introduce myself first. The editor graduated from Shanghai Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Ali in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a copy of "a complete set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials
边栏推荐
猜你喜欢
随机推荐
Read Elephant Swap in one article, why does it bring such a high premium to ePLATO?
2022.07.22 _ a day
【小程序项目开发-- 京东商城】uni-app之自定义搜索组件(下) -- 搜索历史
Locust 1.0版本引入的变化
Machine Learning - Notes and Implementation of Linear Regression, Logistic Regression Problems
vscode输出中文乱码问题
【MySQL功法】第4话 · 和kiko一起探索MySQL中的运算符
2022.07.20_Daily Question
Vscode: Project-tree plugin
mysql insert new field method
力扣 593. 有效的正方形
【面试题】从输入URL到游览器渲染完成,经历了什么
TypeError The view function did not return a valid response. The function either returned None 的解决
Thread 类的基本用法——一网打尽
ZCMU--1862: zbj的狼人杀
MySQL installation to the last step in the write the configuration file failed?And after the installation steps
SSM框架讲解(史上最详细的文章)
MySQL detailed explanation
数组every和some方法的区别?
个人报错问题 持续总结








