当前位置:网站首页>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 configurationUnzip 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
边栏推荐
猜你喜欢
随机推荐
NK-RTU980烧写裸机程序
【idea 报错】 无效的目标发行版:17 的解决参考
关于@Autowired
实用生物信息学2:多组学数据整合和挖掘
MySQL安装教程
MySQL 8.0.29 解压版安装教程(亲测有效)
XSS靶场prompt.ml过关详解
奉劝那些刚参加工作的学弟学妹们:要想进大厂,这些核心技能是你必须要掌握的!完整学习路线!
【小程序专栏】总结uniapp开发小程序的开发规范
sqli-labs(less-11)
【小程序项目开发-- 京东商城】uni-app之自定义搜索组件(中)-- 搜索建议
【小程序项目开发--京东商城】uni-app之自定义搜索组件(上)-- 组件UI
《c语言小游戏》入门级三子棋游戏(机器人加强版)
SQL 嵌套 N 层太长太难写怎么办?
WLAN部署(AC+AP)配置及常见问题记录
Read Elephant Swap in one article, why does it bring such a high premium to ePLATO?
【云原生与5G】微服务加持5G核心网
云服务器部署 Web 项目
[PSQL] SQL Basic Course Reading Notes (Chapter1-4)
MySQL安装常见报错处理大全