Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Example MySQL config file for very large systems.
- #
- # This is for a large system with memory of 1G-2G where the system runs mainly
- # MySQL.
- #
- # You can copy this file to
- # /etc/my.cnf to set global options,
- # mysql-data-dir/my.cnf to set server-specific options (in this
- # installation this directory is /usr/local/mysql/data) or
- # ~/.my.cnf to set user-specific options.
- #
- # In this file, you can use all long options that a program supports.
- # If you want to know which options a program supports, run the program
- # with the "--help" option.
- # The following options will be passed to all MySQL clients
- [client]
- #password = your_password
- port = 3306
- socket = /tmp/mysql.sock
- # Here follows entries for some specific programs
- # The MySQL server
- [mysqld]
- port = 3306
- socket = /tmp/mysql.sock
- skip-locking
- key_buffer = 256M
- max_allowed_packet = 32M
- table_cache = 1024
- sort_buffer_size = 1M
- read_buffer_size = 1M
- read_rnd_buffer_size = 8M
- myisam_sort_buffer_size = 64M
- thread_cache_size = 40
- query_cache_size = 32M
- # Try number of CPU's*2 for thread_concurrency
- thread_concurrency = 16
- ###### QWQ add start ######
- #bind-address = 127.0.0.1
- pid-file=/data/mysql/data/mysqld.pid
- datadir=/data/mysql/data
- tmpdir=/data/mysql/data
- slave-load-tmpdir=/data/mysql/data
- local_infile = off
- max_connections = 2048
- wait_timeout = 60
- interactive_timeout = 60
- thread_stack = 1M
- # The --log-warnings server option now is enabled by default
- skip-log-warnings
- # See http://www.mysql.com/doc/en/Stability.html
- skip-external-locking
- skip-name-resolve
- # See http://www.mysql.com/doc/en/Symbolic_links_to_tables.html
- skip-symbolic-links
- # No InnoDB for now
- #skip-innodb
- # No NDB for now
- #skip-ndbcluster
- # Log slow queries and the queries which do not use indexes
- #slow_query_log
- #slow_query_log_file = /data/mysql/data/mysqld-slow.log
- log-slow-queries = /data/mysql/data/mysqld-slow.log
- log-queries-not-using-indexes
- long-query-time = 2
- #log-error
- log-error = /data/mysql/data/mysqld.err
- # Replication Master Server (default)
- log-bin = /data/mysql/data/mysqld-bin
- max_binlog_size=1G
- expire_logs_days=10
- #binlog-do-db=db_name1
- #binlog-do-db=db_name2
- #binlog-ignore-db=db_name1
- #binlog-ignore-db=db_name2
- # Replication Slave Server (comment out master section to use this)
- master-host=
- master-user=repler
- master-password=qihoo.net
- master-port=3306
- report-host=
- relay-log=/data/mysql/data/relay-bin
- max-relay-log-size=1G
- relay-log-space-limit=0
- relay-log-purge=1
- #master-retry-count=999
- master-connect-retry=1
- #log-bin=/data/mysql/data/mysqld-bin # not required for slaves, but recommended
- #replicate-do-db=cacti
- #replicate-do-db=cacti_db1
- #replicate-do-db=mysql
- #replicate-do-db=db_name1
- #replicate-do-db=db_name2
- #replicate-do-table=db_name.tbl_name1
- #replicate-do-table=db_name.tbl_name2
- #replicate-ignore-db=db_name1
- #replicate-ignore-db=db_name2
- #replicate-ignore-table=db_name.tbl_name1
- #replicate-ignore-table=db_name.tbl_name2
- #replicate-wild-do-table=db.%
- replicate-same-server-id = 0 # use the default setting of 0, to prevent infinite loops caused by circular replication.
- log-slave-updates
- slave-skip-errors=all
- sync_binlog=0
- #auto_increment_increment=2
- #auto_increment_offset=1
- #skip-slave-start
Add Comment
Please, Sign In to add comment