@@ -201,39 +201,39 @@ log "->Install"
201
201
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
202
202
rpm -ivh mysql-community-release-el7-5.noarch.rpm
203
203
yum install mysql-server -y
204
- # log "->Tuning"
205
- # head -n -6 /etc/my.cnf >> /etc/my.cnf.new
206
- # mv /etc/my.cnf /etc/my.cnf.rpminstall
207
- # mv /etc/my.cnf.new /etc/my.cnf
208
- # echo -e "transaction_isolation = READ-COMMITTED\n\
209
- # read_buffer_size = 2M\n\
210
- # read_rnd_buffer_size = 16M\n\
211
- # sort_buffer_size = 8M\n\
212
- # join_buffer_size = 8M\n\
213
- # thread_stack = 256K\n\
214
- # thread_cache_size = 64\n\
215
- # max_connections = 700\n\
216
- # key_buffer_size = 32M\n\
217
- # max_allowed_packet = 32M\n\
218
- # log_bin=/var/lib/mysql/mysql_binary_log\n\
219
- # server_id=1\n\
220
- # binlog_format = mixed\n\
221
- # \n\
222
- # # InnoDB Settings\n\
223
- # innodb_file_per_table = 1\n\
224
- # innodb_flush_log_at_trx_commit = 2\n\
225
- # innodb_log_buffer_size = 64M\n\
226
- # innodb_thread_concurrency = 8\n\
227
- # innodb_buffer_pool_size = 4G\n\
228
- # innodb_flush_method = O_DIRECT\n\
229
- # innodb_log_file_size = 512M\n\
230
- # \n\
231
- # [mysqld_safe]\n\
232
- # log-error=/var/log/mysqld.log
233
- # pid-file=/var/run/mysqld/mysqld.pid \n\
234
- # \n\
235
- # sql_mode=STRICT_ALL_TABLES\n\
236
- # " >> /etc/my.cnf
204
+ log " ->Tuning"
205
+ head -n -6 /etc/my.cnf >> /etc/my.cnf.new
206
+ mv /etc/my.cnf /etc/my.cnf.rpminstall
207
+ mv /etc/my.cnf.new /etc/my.cnf
208
+ echo -e " transaction_isolation = READ-COMMITTED\n\
209
+ read_buffer_size = 2M\n\
210
+ read_rnd_buffer_size = 16M\n\
211
+ sort_buffer_size = 8M\n\
212
+ join_buffer_size = 8M\n\
213
+ thread_stack = 256K\n\
214
+ thread_cache_size = 64\n\
215
+ max_connections = 700\n\
216
+ key_buffer_size = 32M\n\
217
+ max_allowed_packet = 32M\n\
218
+ log_bin=/var/lib/mysql/mysql_binary_log\n\
219
+ server_id=1\n\
220
+ binlog_format = mixed\n\
221
+ \n\
222
+ # InnoDB Settings\n\
223
+ innodb_file_per_table = 1\n\
224
+ innodb_flush_log_at_trx_commit = 2\n\
225
+ innodb_log_buffer_size = 64M\n\
226
+ innodb_thread_concurrency = 8\n\
227
+ innodb_buffer_pool_size = 4G\n\
228
+ innodb_flush_method = O_DIRECT\n\
229
+ innodb_log_file_size = 512M\n\
230
+ \n\
231
+ [mysqld_safe]\n\
232
+ log-error=/var/log/mysqld.log
233
+ pid-file=/var/run/mysqld/mysqld.pid \n\
234
+ \n\
235
+ sql_mode=STRICT_ALL_TABLES\n\
236
+ " >> /etc/my.cnf
237
237
log " ->Start"
238
238
systemctl enable mysqld
239
239
systemctl start mysqld
0 commit comments