1、首先先去官网将自己需要的版本下载到本地
由于我的电脑已经安装了mysql5.5与mysql5.7,为方便演示,使用mysql8.0.20进行安装。
https://dev.mysql.com/downloads/mysql/
2、解压路径
我将mysql 8.0.20解压至目录D:\MySQL\MySql Server 8.0.20\
。同时从mysql5.5那边复制了一份my.ini。
3、配置环境变量
我这里直接添加mysql8.0.20的bin目录到Path中:
4、配置my.ini
[client]
port=3308
[mysqld]
# The TCP/IP Port the MySQL Server will listen on
port=3308
#Path to installation directory. All paths are usually resolved relative to this.
basedir="D:/MySQL/MySql Server 8.0.20/"
#Path to the database root
datadir=&#