my-huge.cnf.sh 4.83 KB
Newer Older
unknown's avatar
unknown committed
1
# Example MySQL config file for very large systems.
unknown's avatar
unknown committed
2
#
unknown's avatar
unknown committed
3
# This is for a large system with memory of 1G-2G where the system runs mainly
unknown's avatar
unknown committed
4 5 6
# MySQL.
#
# You can copy this file to
unknown's avatar
unknown committed
7
# /etc/my.cnf to set global options,
unknown's avatar
unknown committed
8 9 10 11
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is @localstatedir@) or
# ~/.my.cnf to set user-specific options.
#
unknown's avatar
unknown committed
12
# In this file, you can use all long options that a program supports.
unknown's avatar
unknown committed
13
# If you want to know which options a program supports, run the program
unknown's avatar
unknown committed
14
# with the "--help" option.
unknown's avatar
unknown committed
15 16 17 18 19 20 21 22 23 24 25 26 27 28

# The following options will be passed to all MySQL clients
[client]
#password	= your_password
port		= @MYSQL_TCP_PORT@
socket		= @MYSQL_UNIX_ADDR@

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port		= @MYSQL_TCP_PORT@
socket		= @MYSQL_UNIX_ADDR@
skip-locking
29 30 31 32 33
key_buffer = 384M
max_allowed_packet = 1M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
34
read_rnd_buffer_size = 8M
35
myisam_sort_buffer_size = 64M
36
thread_cache_size = 8
unknown's avatar
merge  
unknown committed
37
query_cache_size = 32M
38
# Try number of CPU's*2 for thread_concurrency
39
thread_concurrency = 8
40 41 42 43 44

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
45
# (via the "enable-named-pipe" option) will render mysqld useless!
46 47
# 
#skip-networking
48

49 50 51
# Disable Federated by default
skip-federated

52
# Replication Master Server (default)
53
# binary logging is required for replication
54
log-bin=mysql-bin
55 56 57 58 59

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id	= 1
60

61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
#    the syntax is:
#
#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
#    where you replace <host>, <user>, <password> by quoted strings and
#    <port> by the master's port number (3306 by default).
#
#    Example:
#
#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
#    MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
#    start replication for the first time (even unsuccessfully, for example
#    if you mistyped the password in master-password and the slave fails to
#    connect), the slave will create a master.info file, and any later
#    change in this file to the variables' values below will be ignored and
#    overridden by the content of the master.info file, unless you shutdown
#    the slave server, delete master.info and restart the slaver server.
#    For that reason, you may want to leave the lines below untouched
#    (commented) and instead use CHANGE MASTER TO (see above)
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id       = 2
#
# The replication master for this slave - required
#master-host     =   <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user     =   <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password =   <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port     =  <port>
#
# binary logging - not required for slaves, but recommended
114
#log-bin=mysql-bin
115 116 117
#
# binary logging format - mixed recommended 
#binlog_format=mixed
unknown's avatar
unknown committed
118

unknown's avatar
unknown committed
119 120 121 122
# Point the following paths to different dedicated disks
#tmpdir		= /tmp/		
#log-update 	= /path-to-dedicated-directory/hostname

123
# Uncomment the following if you are using InnoDB tables
unknown's avatar
unknown committed
124
#innodb_data_home_dir = @localstatedir@/
125
#innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
unknown's avatar
unknown committed
126 127
#innodb_log_group_home_dir = @localstatedir@/
#innodb_log_arch_dir = @localstatedir@/
128 129
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
130 131
#innodb_buffer_pool_size = 384M
#innodb_additional_mem_pool_size = 20M
132
# Set .._log_file_size to 25 % of buffer pool size
133 134 135 136
#innodb_log_file_size = 100M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50
unknown's avatar
unknown committed
137 138 139

[mysqldump]
quick
140
max_allowed_packet = 16M
unknown's avatar
unknown committed
141 142 143

[mysql]
no-auto-rehash
144 145
# Remove the next comment character if you are not familiar with SQL
#safe-updates
unknown's avatar
unknown committed
146 147

[isamchk]
148 149 150 151
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
unknown's avatar
unknown committed
152 153

[myisamchk]
154 155 156 157
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
158 159 160

[mysqlhotcopy]
interactive-timeout