当前位置:网站首页>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
边栏推荐
- 关于yum源的配置及更新
- 免安装版的Mysql安装与配置——详细教程
- 会话技术之Coookie && Session详解
- [Interview: Concurrency 38: Multithreading: Thread Pool] Basic concepts of the ThreadPoolExecutor class
- vscode输出中文乱码问题
- SQLAlchemy使用教程
- SSM框架讲解(史上最详细的文章)
- 【小程序项目开发 -- 京东商城】uni-app 商品分类页面(下)
- Linux redis6.2.6 configuration file
- "The C language games" mine clearance
猜你喜欢

分布式缓存系统必须要解决的四大问题

如何使用mysql binlog 恢复数据
![[PSQL] SQL Basic Course Reading Notes (Chapter1-4)](/img/76/d416f79b7f2c93c1c79a285c30d3e6.png)
[PSQL] SQL Basic Course Reading Notes (Chapter1-4)

TypeError The view function did not return a valid response. The function either returned None 的解决

【云原生&微服务五】Ribbon负载均衡策略之随机ThreadLocalRandom

【云原生】微服务之Feign的介绍与使用

@Transactional注解的失效场景

MySQL 5.7详细下载安装配置教程

安装部署KubeSphere管理kubernetes

云服务器部署 Web 项目
随机推荐
Linux redis6.2.6 configuration file
Embedded system driver primary [2] - _ parameters and dependencies under the kernel module
关于@Autowired
哆啦a梦教你页面的转发与重定向
《C语言小游戏》扫雷
2022.07.22 _ a day
MySQL table creation statement_Three commonly used MySQL table creation statements
MySQL 5.7 安装教程(全步骤、保姆级教程)
Client navicat installation tutorial
CY7C68013A之LED闪烁
Failure scenarios of @Transactional annotations
关于yum源的配置及更新
【插值与拟合】
Tasks and task switching
如何升级nodejs版本
@Transactional注解的失效场景
Ceph single node deployment
0730~Mysql优化
动态顺序表的增删查改(C语言实现)
Jetpack Compose学习(8)——State及remeber