羊皮纸论坛目录 / 程式设计 / 资料库 / Mysql /

MySQL 设定相关参数

发表新主题
随机主题
上个主题
下个主题
|
MySQL 设定相关参数

back_log 50 <=要求mysql能保有的连接数量。back_log指出在mysql暂停接受连接的时间内,有多少个连接请求可被存在伫列中
basedir /usr/local/mysql
bdb_cache_size 8388572 <=BDB字首代表BDB的DATABASE相关参数,为我只用MYISAM格式所以跳过
bdb_home /usr/local/mysql
bdb_log_buffer_size 32768
bdb_logdir
bdb_max_lock 10000
bdb_shared_data OFF
bdb_tmpdir /tmp/
bdb_version Sleepycat Software: ...
binlog_cache_size 32768
bulk_insert_buffer_size 8388608
character_set latin1
character_sets latin1 big5 czech euc_kr
concurrent_insert ON
connect_timeout 5 <=MYSQLD用来判断此连线是否有效的时间,建议预设如果网路缓慢可以调高
convert_character_set
datadir /usr/local/mysql/data/
default_week_format 0
delay_key_write ON
delayed_insert_limit 100
delayed_insert_timeout 300
delayed_queue_size 1000
flush OFF
flush_time 0
ft_boolean_syntax + -><()~*:""&|
ft_max_word_len 84
ft_min_word_len 4
ft_query_expansion_limit 20
ft_stopword_file (built-in)
have_bdb YES
have_innodb YES
have_isam YES
have_openssl YES
have_query_cache YES
have_raid NO
have_symlink DISABLED
init_file
innodb_additional_mem_pool_size 1048576 <=INNODB格式资料库的设定参数,一样跳过
innodb_buffer_pool_size 8388608
innodb_data_file_path ibdata1:10M:autoextend
innodb_data_home_dir
innodb_fast_shutdown ON
innodb_file_io_threads 4
innodb_flush_log_at_trx_commit 1
innodb_flush_method
innodb_force_recovery 0
innodb_lock_wait_timeout 50
innodb_log_arch_dir
innodb_log_archive OFF
innodb_log_buffer_size 1048576
innodb_log_file_size 5242880
innodb_log_files_in_group 2
innodb_log_group_home_dir ./
innodb_mirrored_log_groups 1
innodb_thread_concurrency 8
interactive_timeout 28800 <=用COMMAND LINE方式连线时,例如用MYSQL连线,允许的IDLE时间
join_buffer_size 131072 <=使用到JOIN时会用到,暂存搜寻结果用有大SELECT时要视情况增加,此为THREAD BASE BUFFER,就是每个连线都会多配置这个大小的记忆体
key_buffer_size 16773120 <=主暂存区大小所有THREAD共用
key_cache_age_threshold 300
key_cache_block_size 1024
<=key cache一个block的大小
key_cache_division_limit 100
language /usr/local/mysql/share/...
large_files_support ON
local_infile ON
locked_in_memory OFF
log OFF
log_bin OFF
log_slave_updates OFF
log_slow_queries OFF
log_update OFF
log_warnings 1
long_query_time 10
low_priority_updates OFF
lower_case_table_names 0
max_allowed_packet 1047552
max_binlog_cache_size 4294967295
max_binlog_size 1073741824
max_connect_errors 10
max_connections 100 <=允许最大连线数,正式环境绝对远超过,要视系统记忆体大小增加,过多会导致系统垮掉
max_delayed_threads 20
max_error_count 64
max_heap_table_size 16777216
max_join_size 4294967295
max_relay_log_size 0
max_sort_length 1024
max_tmp_tables 32 <=允许的暂时TABLE数目
max_user_connections 0
max_write_lock_count 4294967295
myisam_max_extra_sort_file_size 268435456
myisam_max_sort_file_size 2147483647
myisam_recover_options force
myisam_repair_threads 1
myisam_sort_buffer_size 8388608
net_buffer_length 16384 <=网路暂存BUFFER,16384是TCP最大封包长度
net_read_timeout 30
net_retry_count 10
net_write_timeout 60
open_files_limit 1024 <=允许MYSQL开启的系统档案数上限
pid_file /usr/local/mysql/name.pid
port 3306
protocol_version 10
query_cache_limit 1048576
query_cache_size 0
query_cache_type ON
read_buffer_size 131072 <=读取资料的BUFFER大小,THREAD BASE会影响SQL速率
read_rnd_buffer_size 262144
rpl_recovery_rank 0
server_id 0
skip_external_locking ON
skip_networking OFF
skip_show_database OFF
slave_net_timeout 3600
slow_launch_time 2
socket /tmp/mysql.sock
sort_buffer_size 2097116 <=用来排序的BUFFER,如果回传大的结果又使用ORDER BY加大这个BUFFER可以提升速度
sql_mode
table_cache 64 <=允许暂存在CACHE里的TABLE数量
table_type MYISAM
thread_cache_size 3
thread_stack 131072
timezone EEST
tmp_table_size 33554432 <=暂存在记忆体中的暂存TABLE大小
tmpdir /tmp/:/mnt/hd2/tmp/
tx_isolation READ-COMMITTED
version 4.0.4-beta
wait_timeout 28800 <=这个连线的TIMEOUT时间,这个参数是由global wait_timeout 或是interactive_timeou继承下来的。而且在COMMAND LINE时无法看到GLOBAL WAITTIMEOUT,这个值会继承自interactive_timeout
  • 关键字 : mysql, local, 4294967295, 8388608, 1048576, 131072, 允许, wait_timeout, latin1, BUFFER, 32768, 28800, 16384, 连接数量, 连接, 这个连线, 这个参数, 跳过, 读取资料, 设定参数
0 0
2009-05-20T13:00:50+0000


  • 当您未登入羊皮纸时,可以利用脸书 Facebook 登入来发表回响。若使用羊皮纸会员身份发表回响则可获得经验值及虚拟金币,用来参加羊皮纸推出的活动。
发表回响
 
验证字串