配置文件1-bash-4.1# more /etc/my.cnf# For advice on how to change settings please see# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html[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## 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 = 2Mdatadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sockvalidate_password=OFFserver-id=1user=mysqllog-bin=mysql-binlog-slave-updatesslave-skip-errors=allsync_binlog=1auto-increment-increment = 1auto-increment-offset = 1# Disabling symbolic-links is recommended to prevent assorted security riskssymbolic-links=0relay_log=/var/lib/mysql/mysql-relay-binlog-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pid-bash-4.1# 配置文件2 -bash-4.1# more /etc/my.cnf# For advice on how to change settings please see# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html[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## 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 = 2Mdatadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sockvalidate_password=OFFserver-id=2log-bin=mysql-binlog-slave-updatesslave-skip-errors=allsync_binlog=1auto_increment_increment=2auto_increment_offset=1# Disabling symbolic-links is recommended to prevent assorted security riskssymbolic-links=0relay_log=/var/lib/mysql/mysql-relay-binlog-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pid本文永久更新链接地址