1.下载 tar.gz 格式的安装包
2.解压
tar -zvxf mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz
mv mysql-5.7.19-linux-glibc2.12-x86_64 mysql5719
mv mysql5719 /mysql
chown -R mysql:mysql /mysql/mysql5719
3.配置 my.cnf
master 节点配置,进入到/mysql/mysql5719 目录下面,创建文件 my.cnf,文件内容如下
[mysqld]
datadir=/mysql/mysql5719/data
socket=/mysql/mysql5719/data/mysql.sock
tmpdir = /tmp
user=mysql
basedir = /mysql/mysql5719
log-bin = master-bin
log-bin-index = master-bin.index
server-id = 1
# Disabling symbolic-links is recommended to prevent assorted security risks
#symbolic-links=0
#key_buffer = 16M
key_buffer_size = 32M
max_allowed_packet = 16M
thread_stack = 128K
thread_cache_size = 64
query_cache_limit = 8M
query_cache_size = 64M
query_cache_type = 1
# Important: see Distributing the Databases and Setting max_connections
max_connections = 3000
binlog_format=mixed
log_bin_trust_function_creators = 1
## @!!@
lower_case_table_names = 1
#default-storage-engine=InnoDB
#character_set_client=utf8
#default-collation=utf8_unicode_ci
character-set-server=utf8
collation-server=utf8_unicode_ci
read_buffer_size = 2M
read_rnd_buffer_size = 16M
sort_buffer_size = 8M
join_buffer_size = 8M
lower_case_table_names =