mysql8.0的多实例安装与mysql5多实例安装是有一些差别的,网络上也没有相应的文章,我综合网上的方案进行了多实例的安装,本次安装的环境为centos7.4,root账号
一、从我的上一篇文章中,二进制方式安装好mysql8
二、准备多实例环境,这里只说一个实例的安装,多实例做相应的改动即可.
mkdir -p /data/mysqldata/{3307/{
data,tmp,binlog,innodb_ts,innodb_log},backup,scripts}
在/data/mysqldata/3307下创建my.cnf文件
[client]
port = 3307
socket = /data/mysqldata/3307/mysql.sock
# The MySQL server
[mysqld]
port = 3307
mysqlx_port = 33070
user = root
socket = /data/mysqldata/3307/mysql.sock
mysqlx_socket=/data/mysqldata/3307/mysqlx.sock
pid-file = /data/mysqldata/3307/mysql.pid
basedir = /usr/local/mysql8
datadir = /data/mysqldata/3307/data
tmpdir = /data/mysqldata/3307/tmp
open_files_limit = 60000
explicit_defaults_for_timestamp
server-id = 1203307
lower_case_table_names = 1
character-set-server = utf8
federated
#sql_mode=STRICT_TRANS_TABLES
max_connections = 1000
max_connect