[mysql] default-character-set=utf8 [mysqld] ### configure separately on master/slave : ### define 2 virtual IPs : one for MASTER, and the other for ANALYSIS. ### they can point to same server or ANALYSIS could be handled by the slave one. server_id=1 ### Rather prefer assciating autoinc key with "server_id" auto_increment_offset=1 auto_increment_increment=2 ### configure based on machine resources : ### slaves automatically increase key_buffer_size key_buffer_size=256M max_heap_table_size=128M innodb_buffer_pool_size = 256M innodb_additional_mem_pool_size=16M innodb_log_file_size = 128M innodb_log_buffer_size = 16M innodb_data_file_path = ibdata1:8G:autoextend #key_cache_division_limit=? (master:100, slave:20) ### configure based on platform/environment : basedir =/opt/mysql/mysql init_file =/tank/mysql/myinit.sql log_bin =/tank/mysql/log/mysql-bin log_error =/tank/mysql/log/mysql.err tmpdir =/tank/mysql/tmp datadir =/tank/mysql/data innodb_data_home_dir =/tank/mysql/innodbdata innodb_log_group_home_dir =/tank/mysql/innodblog master_info_file =/tank/mysql/master.info relay_log =/tank/mysql/log/mysql-relay-bin relay_log_index =/tank/mysql/log/mysql-relay-bin.index relay_log_info_file =/tank/mysql/log/relay-log.info # Set the SQL mode to strict sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" expire_logs_days=99 ### binlog_format options : ROW, STATEMENT, MIXED binlog_format=ROW ### unfortunately no wildcard support and depends on "USE DB;" : binlog_ignore_db=qt% replicate_wild_ignore_table=qnorep%.% replicate_wild_ignore_table=qt%.% ### unfortunately, global work spaces prevent setting slaves as "read_only" and ### there is no such thing as "read_only_except_replicate_ignored" or "read_only_except_wild_table" sync_binlog=1 table_cache = 10000 table_definition_cache=20000 default-character-set=utf8 event_scheduler=ON skip-name-resolve read_rnd_buffer_size = 2M sort_buffer_size = 32k thread_cache = 8 query_cache_size = 0M thread_concurrency = 8 myisam_recover=BACKUP,FORCE # innodb_file_per_table # ZFS guaranties complete pages , no need for innodb_doublewrite : innodb_doublewrite=0 # ZFS guaranties complete pages , no need for innodb_checksums : innodb_checksums=0 innodb_flush_log_at_trx_commit = 1 innodb_support_xa=1 innodb_thread_concurrency=0 # when ZFS supoorts this : innodb_flush_method = O_DIRECT