[client] socket=/var/local/mysqldata/mysql.sock [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid [mysqld] datadir = /var/local/mysqldata socket = /var/local/mysqldata/mysql.sock user=mysql old_passwords=0 max_allowed_packet = 1G net_buffer_length = 1M net_write_timeout = 180 # InnoDB tuning innodb_file_per_table # Combined size of innodb log file must be < 4G # there are two by default, so they must both # be less than 2G or 2048M. # Also, should be somewhat less than the size # of the buffer pool. innodb_buffer_pool_size = 5G innodb_log_file_size = 2047M # Temp file directories for mysqld tmpdir = /var/local/mysqltmp slave-load-tmpdir = /var/local/mysqltmp # 2014-05-12 mdiehn: requested by Paul and JT. # Default for max_connections is 151. # MySQL docs say Linux and Sun can do 500 - 1000 easily # and up to 10,000 in some circumstances, but we'd need # to study a bit if we want to go over 1000. # http://dev.mysql.com/doc/refman/5.1/en/too-many-connections.html # max_connections = 500 # # also - increasing max_connections makes MySQL use more # filehandles and so it makes sense also to increase # open-files-limit. The default is 1024. # open_files_limit = 102400 # # 2013-12-23 transaction logging for replication # #----------------------------------------------------------------- # Enable transaction logging and specify the base name of the logs # log-bin=test-db02-mysqld-bin # #----------------------------------------------------------------- # # Tells the slave server not to start the slave threads when the server starts. # To start the threads later, use a START SLAVE statement. # skip-slave-start # #----------------------------------------------------------------- # # Tell the slave it should also binary log so we can # chain another slave from it. # log-slave-updates # #----------------------------------------------------------------- # If you omit server-id (or set it explicitly to its default value of 0), a # master refuses connections from all slaves. # server-id=1338 # #----------------------------------------------------------------- # # For the greatest possible durability and consistency in a replication setup # using InnoDB with transactions, you should use innodb_flush_log_at_trx_commit=1 # and sync_binlog=1 in the master my.cnf file. # innodb_flush_log_at_trx_commit=1 # #----------------------------------------------------------------- # If the value of this variable is greater than 0, the MySQL server # synchronizes its binary log to disk (using fdatasync()) after every # sync_binlog writes to the binary log. # sync_binlog=1 # #----------------------------------------------------------------- # Based on http://dev.mysql.com/doc/refman/5.1/en/binary-log-formats.html # used MIXED to avoid problems with nondeterministic statements # should be OK because we don't need compat with 5.0 # binlog-format = STATEMENT #binlog-format = ROW # #----------------------------------------------------------------- # If used with ROW format, will reliably restrict logging to # the named database # # 2014-05-08 mdiehn, disabled because dangerous per # http://www.mysqlperformanceblog.com/2009/05/14/why-mysqls-binlog-do-db-option-is-dangerous/ # #binlog-do-db=cdna # #----------------------------------------------------------------- # A transaction is written in one chunk to the binary log, so it is never # split between several binary logs. Therefore, if you have big transactions, # you might see binary log files larger than max_binlog_size. # # bin logfile size limit: min 4K, max 1G # max_binlog_size=268435456 # #----------------------------------------------------------------- # # The size of the buffer that is allocated when sorting MyISAM indexes during a # REPAIR TABLE or when creating indexes with CREATE INDEX or ALTER TABLE. # # The maximum permissible setting for myisam_sort_buffer_size is 4GB. As of # MySQL 5.1.23, values larger than 4GB are permitted for 64-bit platforms # (except 64-bit Windows, for which large values are truncated to 4GB with a # warning). # # myisam_sort_buffer_size=6GB # #-----------------------------------------------------------------