Mysql安装多版本数据库

时间:2019-11-25
本文章向大家介绍Mysql安装多版本数据库,主要包括Mysql安装多版本数据库使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

1、下载对应版本压缩包

2、解压缩文件

3、到解压缩文件,添加my.ini文件,修改相关的配置,如端口,文件路径等

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7.28/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.
 
[mysqld]
 
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
innodb_buffer_pool_size = 128M
 
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
 
# These are commonly set, remove the # and set as required.
basedir = D:\database\mysql\mysql5.7.28
datadir = D:\database\mysql\mysql5.7.28\data
#skip-grant-tables
port = 3307
server_id = 1
 
 
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
join_buffer_size = 128M
sort_buffer_size = 2M
read_rnd_buffer_size = 2M 
 
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 

4、到bin目录执行:会产生root用户的临时密码

mysqld --defaults-file=D:\database\mysql\mysql5.7.28\my.ini --initialize --console

5、安装mysql服务:

mysqld install MySQL57 --defaults-file="D:\database\mysql\mysql5.7.28\my.ini

原文地址:https://www.cnblogs.com/miaosj/p/11926002.html