Mysql 主从限制数据库

主库配置 
# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the # *** default location during install, and will be replaced if you # *** upgrade to a newer version of MySQL. [client] port = 3306 socket=/tmp/mysql.sock [mysqld] port = 3306 socket=/tmp/mysql.sock skip-external-locking datadir=/usr/local/mysql/data key_buffer_size = 32M max_allowed_packet = 1M table_open_cache = 4096 sort_buffer_size = 4M read_rnd_buffer_size = 4M myisam_sort_buffer_size = 64M lower_case_table_names = 0 log-bin=master-bin log-bin-index=master-bin.index binlog_format=mixed max_allowed_packet=50M connect_timeout=60 net_read_timeout = 60 max_connections=2000 binlog-do-db=jrd replicate-do-db=jrd binlog-ignore-db=mysql binlog-ignore-db=test binlog-ignore-db=information_schema binlog-ignore-db=performance_schema replicate-ignore-db=test replicate-ignore-db=mysql replicate-ignore-db=information_schema replicate-ignore-db=performance_schema binlog-ignore-db=mysql,test server-id = 1 # 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 # These are commonly set, remove the # and set as required. # basedir = ..... # datadir = ..... # port = ..... # server_id = ..... # socket = ..... # 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 = 2M sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
从库
# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the # *** default location during install, and will be replaced if you # *** upgrade to a newer version of MySQL. [client] port = 3306 socket=/tmp/mysql.sock [mysqld] port = 3306 socket=/tmp/mysql.sock skip-external-locking datadir=/usr/local/mysql/data key_buffer_size = 32M max_allowed_packet = 1M table_open_cache = 4096 sort_buffer_size = 4M read_rnd_buffer_size = 4M myisam_sort_buffer_size = 64M lower_case_table_names = 0 log-bin=master-bin log-bin-index=master-bin.index binlog_format=mixed max_allowed_packet=50M connect_timeout=60 net_read_timeout = 60 max_connections=2000 binlog-do-db=jrd replicate-do-db=jrd binlog-ignore-db=mysql binlog-ignore-db=test binlog-ignore-db=information_schema binlog-ignore-db=performance_schema replicate-ignore-db=test replicate-ignore-db=mysql replicate-ignore-db=information_schema replicate-ignore-db=performance_schema relay-log =relay-log relay-log-index =relay-log.index binlog_format=mixed max_allowed_packet=50M lower_case_table_names = 0 log-bin=master-bin log-bin-index=master-bin.index server-id = 11 # 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%. # datadir = ..... # port = ..... # server_id = ..... # socket = ..... # 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 = 2M sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

 

posted @ 2015-02-10 09:43  想想宝宝  阅读(328)  评论(0编辑  收藏  举报