标签:var 文件 mys emc 创建 system socket 删除 dir
MySQL 5.7 创建多个实例 基于CentOS 7[mysqld@db01]
datadir=/var/lib/mysql-replica01
socket=/var/lib/mysql-replica01/mysql.sock
port=3307
log-error=/var/log/mysqld-replica01.log
[mysqld@db02]
datadir=/var/lib/mysql-replica02
socket=/var/lib/mysql-replica02/mysql.sock
port=3308
log-error=/var/log/mysqld-replica02.log
启用服务
systemctl enable mysqld@db01
systemctl enable mysqld@db02
开启实例
systemctl start mysqld@db01
systemctl start mysqld@db01
删除服务
systemctl disable mysqld@db01
systemctl disable mysqld@db01
管理实例
mysql -S /var/lib/mysql-replica01/mysql.sock -uroot -p
mysql -S /var/lib/mysql-replica02/mysql.sock -uroot -p
标签:var 文件 mys emc 创建 system socket 删除 dir
原文地址:https://blog.51cto.com/mydbs/2541282