当前位置:网站首页>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
边栏推荐
- 《如何戒掉坏习惯》读书笔记
- R语言 第一部分
- MySQL安装教程
- 进程调度的基本过程
- MySql数据库优化查询工具
- Navicat new database
- 免安装版的Mysql安装与配置——详细教程
- mysql insert new field method
- TypeError The view function did not return a valid response. The function either returned None 的解决
- Collation and sharing of related classic papers and datasets in the field of deep learning communication
猜你喜欢
随机推荐
Collation and sharing of related classic papers and datasets in the field of deep learning communication
Tasks and task switching
PowerCLi 通过自建PXE Server一键esxi7下批量部署常规New-VM
ros little turtle drawing
2022.07.22 _ a day
Unreal基础概念
MySql 5.7.38下载安装教程 ,并实现在Navicat操作MySql
[PSQL] SQL Basic Course Reading Notes (Chapter1-4)
【Objective-C语言中的@property】
regex bypass
Client navicat installation tutorial
MySQL detailed explanation
Vulkan与OpenGL对比——Vulkan的全新渲染架构
Shell编程之条件语句
2704:寻找平面上的极大点
Practical Bioinformatics 2: Multi-omics data integration and mining
XSS详解
初识NK-RTU980开发板
模块化规范
Ubuntu22.04安装mysql









