当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
MySQL安装教程
Calculation example of matlab program iEEE9 node system for power flow calculation of AC-DC hybrid system based on alternate iteration method
【云原生】微服务之Feign的介绍与使用
vscode输出中文乱码问题
NK-RTU980烧写裸机程序
48页智慧城市规划蓝图 解决方案
[PSQL] Complex query
Ceph single node deployment
7/28-7/29 Expectation + thinking + suffix array + ST table
Chapter 9 Exceptions try...except...else...finally
SQL 入门之第一讲——MySQL 8.0.29安装教程(windows 64位)
如何在一台机器上(windows)安装两个MYSQL数据库
【黄啊码】MySQL入门—3、我用select ,老板直接赶我坐火车回家去,买的还是站票
Fund investment advisory business
中软国际携手深开鸿发布(1+1) x N 战略,以数字化、智慧化改变人类生产和生活方式
一、MySQL主从复制原理
《opencv学习笔记》-- 仿射变换
如何在 Linux 上安装 MySQL
普通函数的参数校验
手把手教你开发微信小程序自定义底部导航栏









