File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed
Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change 1+ [mysqld]
2+ datadir =/var/lib/mysql
3+ socket =/var/lib/mysql/mysql.sock
4+ user =mysql
5+ symbolic-links =0
6+ max_connections =70
7+ max_user_connections =30
8+ wait_timeout =10
9+ interactive_timeout =50
10+ long_query_time =5
11+ # log-queries-not-using-indexes
12+ # log-slow-queries=/var/log/mysql/log-slow-queries.log
13+
14+ key_buffer = 16M
15+ myisam_sort_buffer_size = 32M
16+ join_buffer_size =1M
17+ read_buffer_size =1M
18+ sort_buffer_size =2M
19+ table_cache =1024
20+ thread_cache_size =286
21+ interactive_timeout =25
22+ connect_timeout =5
23+ max_allowed_packet =1M
24+ max_connect_errors =1000
25+ query_cache_limit =1M
26+ query_cache_size =8M
27+ query_cache_type =1
28+ tmp_table_size =16M
29+
30+ [mysqld_safe]
31+ log-error =/var/log/mysqld.log
32+ pid-file =/var/run/mysqld/mysqld.pid
Original file line number Diff line number Diff line change @@ -436,7 +436,12 @@ if [ -e '/root/.my.cnf' ]; then
436436 mv /root/.my.cnf $vst_backups /mysql/
437437fi
438438mpass=$( gen_pass)
439- wget $CHOST /$VERSION /mysql.cnf -O /etc/my.cnf
439+ server_memory=" $( grep ' MemTotal' /proc/meminfo | tr ' ' ' \n' | grep [0-9]) "
440+ if [ " $server_memory " -gt ' 1000000' ]; then
441+ wget $CHOST /$VERSION /mysql.cnf -O /etc/my.cnf
442+ else
443+ wget $CHOST /$VERSION /mysql-512.cnf -O /etc/my.cnf
444+ fi
440445service mysqld start
441446mysqladmin -u root password $mpass
442447echo -e " [client]\npassword='$mpass '\n" > /root/.my.cnf
You can’t perform that action at this time.
0 commit comments