1 |
# A generic my.cnf file based on /usr/share/mysql/my-medium.cnf |
2 |
# |
3 |
# This is for a system with little memory (32M - 64M) where MySQL plays |
4 |
# an important part, or systems up to 128M where MySQL is used together with |
5 |
# other programs (such as a web server) |
6 |
# |
7 |
|
8 |
# The following options will be passed to all MySQL clients |
9 |
[client] |
10 |
user = root |
11 |
#password = your_password |
12 |
port = 3306 |
13 |
socket = /var/lib/mysql/mysql.sock |
14 |
|
15 |
# Here follows entries for some specific programs |
16 |
|
17 |
# The MySQL server |
18 |
[mysqld] |
19 |
user = mysql |
20 |
datadir = /var/lib/mysql |
21 |
port = 3306 |
22 |
socket = /var/lib/mysql/mysql.sock |
23 |
pid-file = /var/run/mysqld/mysqld.pid |
24 |
skip-external-locking |
25 |
key_buffer = 16M |
26 |
max_allowed_packet = 32M |
27 |
table_cache = 64 |
28 |
sort_buffer_size = 512K |
29 |
net_buffer_length = 8K |
30 |
read_buffer_size = 256K |
31 |
read_rnd_buffer_size = 512K |
32 |
myisam_sort_buffer_size = 8M |
33 |
default-storage-engine = InnoDB |
34 |
;collation_server = utf8_unicode_ci |
35 |
;character_set_server = utf8 |
36 |
|
37 |
# plugins |
38 |
plugin_dir=/usr/lib/mysql/plugin |
39 |
plugin-load=ha_archive.so;ha_blackhole.so;ha_federatedx.so |
40 |
|
41 |
# activate the federated storage engine |
42 |
federated |
43 |
|
44 |
# http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html |
45 |
;rpl_semi_sync_master=semisync_master.so |
46 |
;rpl_semi_sync_slave=semisync_slave.so |
47 |
|
48 |
# Others options for Semisynchronous Replication |
49 |
;rpl_semi_sync_master_enabled=1 |
50 |
;rpl_semi_sync_master_timeout=10 |
51 |
;rpl_semi_sync_slave_enabled=1 |
52 |
|
53 |
# Don't listen on a TCP/IP port at all. This can be a security enhancement, |
54 |
# if all processes that need to connect to mysqld run on the same host. |
55 |
# All interaction with mysqld must be made via Unix sockets or named pipes. |
56 |
# Note that using this option without enabling named pipes on Windows |
57 |
# (via the "enable-named-pipe" option) will render mysqld useless! |
58 |
# |
59 |
skip-networking |
60 |
|
61 |
# Disabling symbolic-links is recommended to prevent assorted security risks |
62 |
symbolic-links=0 |
63 |
|
64 |
# Replication Master Server (default) |
65 |
# binary logging is required for replication |
66 |
#log-bin=mysql-bin |
67 |
|
68 |
# required unique id between 1 and 2^32 - 1 |
69 |
# defaults to 1 if master-host is not set |
70 |
# but will not function as a master if omitted |
71 |
server-id = 1 |
72 |
|
73 |
# Replication Slave (comment out master section to use this) |
74 |
# |
75 |
# To configure this host as a replication slave, you can choose between |
76 |
# two methods : |
77 |
# |
78 |
# 1) Use the CHANGE MASTER TO command (fully described in our manual) - |
79 |
# the syntax is: |
80 |
# |
81 |
# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>, |
82 |
# MASTER_USER=<user>, MASTER_PASSWORD=<password> ; |
83 |
# |
84 |
# where you replace <host>, <user>, <password> by quoted strings and |
85 |
# <port> by the master's port number (3306 by default). |
86 |
# |
87 |
# Example: |
88 |
# |
89 |
# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306, |
90 |
# MASTER_USER='joe', MASTER_PASSWORD='secret'; |
91 |
# |
92 |
# OR |
93 |
# |
94 |
# 2) Set the variables below. However, in case you choose this method, then |
95 |
# start replication for the first time (even unsuccessfully, for example |
96 |
# if you mistyped the password in master-password and the slave fails to |
97 |
# connect), the slave will create a master.info file, and any later |
98 |
# change in this file to the variables' values below will be ignored and |
99 |
# overridden by the content of the master.info file, unless you shutdown |
100 |
# the slave server, delete master.info and restart the slaver server. |
101 |
# For that reason, you may want to leave the lines below untouched |
102 |
# (commented) and instead use CHANGE MASTER TO (see above) |
103 |
# |
104 |
# required unique id between 2 and 2^32 - 1 |
105 |
# (and different from the master) |
106 |
# defaults to 2 if master-host is set |
107 |
# but will not function as a slave if omitted |
108 |
#server-id = 2 |
109 |
# |
110 |
# The replication master for this slave - required |
111 |
#master-host = <hostname> |
112 |
# |
113 |
# The username the slave will use for authentication when connecting |
114 |
# to the master - required |
115 |
#master-user = <username> |
116 |
# |
117 |
# The password the slave will authenticate with when connecting to |
118 |
# the master - required |
119 |
#master-password = <password> |
120 |
# |
121 |
# The port the master is listening on. |
122 |
# optional - defaults to 3306 |
123 |
#master-port = <port> |
124 |
# |
125 |
# binary logging - not required for slaves, but recommended |
126 |
#log-bin=mysql-bin |
127 |
|
128 |
# Point the following paths to different dedicated disks |
129 |
tmpdir = /var/tmp |
130 |
#log-update = /path-to-dedicated-directory/hostname |
131 |
|
132 |
# Uncomment the following if you are using BDB tables |
133 |
#bdb_cache_size = 4M |
134 |
#bdb_max_lock = 10000 |
135 |
|
136 |
# Uncomment the following if you are using InnoDB tables |
137 |
#innodb_data_home_dir = /var/lib/mysql/ |
138 |
#innodb_data_file_path = ibdata1:10M:autoextend |
139 |
#innodb_log_group_home_dir = /var/lib/mysql/ |
140 |
#innodb_log_arch_dir = /var/lib/mysql/ |
141 |
# You can set .._buffer_pool_size up to 50 - 80 % |
142 |
# of RAM but beware of setting memory usage too high |
143 |
#innodb_buffer_pool_size = 16M |
144 |
#innodb_additional_mem_pool_size = 2M |
145 |
# Set .._log_file_size to 25 % of buffer pool size |
146 |
#innodb_log_file_size = 5M |
147 |
#innodb_log_buffer_size = 8M |
148 |
#innodb_flush_log_at_trx_commit = 1 |
149 |
#innodb_lock_wait_timeout = 50 |
150 |
|
151 |
#bind-address=192.168.100.1 |
152 |
|
153 |
[mysqldump] |
154 |
quick |
155 |
max_allowed_packet = 16M |
156 |
|
157 |
[mysql] |
158 |
no-auto-rehash |
159 |
# Remove the next comment character if you are not familiar with SQL |
160 |
#safe-updates |
161 |
default-character-set = utf8 |
162 |
|
163 |
[isamchk] |
164 |
key_buffer = 20M |
165 |
sort_buffer_size = 20M |
166 |
read_buffer = 2M |
167 |
write_buffer = 2M |
168 |
|
169 |
[myisamchk] |
170 |
key_buffer = 20M |
171 |
sort_buffer_size = 20M |
172 |
read_buffer = 2M |
173 |
write_buffer = 2M |
174 |
|
175 |
[mysqlhotcopy] |
176 |
interactive-timeout |
177 |
|
178 |
[mysql.server] |
179 |
user=mysql |
180 |
basedir=/usr |
181 |
|
182 |
[mysqld_safe] |
183 |
log-error=/var/log/mysqld/mysqld.log |
184 |
pid-file=/var/run/mysqld/mysqld.pid |
185 |
|