更新時間:2022-03-21 10:38:19 來源:動力節點 瀏覽1444次
MySQL配置文件詳解
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.
# Suitable for 4G R0M configuration
[mysql]
#default-character-set = utf8mb4
[mysqld]
tmpdir=/data/tmp
lower_case_table_names = 1
ft_min_word_len = 1
character_set-server = utf8mb4
collation_server = utf8mb4_unicode_ci
net_read_timeout=3600
net_write_timeout=3600
innodb_file_per_table=1
max_allowed_packet = 300M
#ibdata1為innodb的共享表空間,用來存儲文件的數據 ibdata2滿后增加,約是ibdata1的1/10mys
innodb_data_file_path = ibdata1:3072M;ibdata2:307M:autoextend
skip-name-resolve
#skip-grant-tables
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
# innodb_force_recovery = 6
# innodb_purge_thread = 0
innodb_buffer_pool_size = 256M
innodb_log_file_size = 64M
max_connections = 1000
query_cache_size = 32M
query_cache_type = 1
query_cache_limit = 65536
innodb_ft_cache_size = 1000000
innodb_ft_result_cache_limit = 50000000
key_buffer_size = 524163
read_buffer_size = 8191
tmp_table_size=16M
max_heap_table_size=16M
slow-query-log=1
slow-query-log-file=/data/mysql/mysql-slow.log
long_query_time=1
wait_timeout=2880000
interactive_timeout=2880000
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
# These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
datadir = /data/mysql/data/
# port = .....
# server_id = .....
# socket = .....
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
以上就是關于“MySQL配置文件詳解”的介紹,大家如果對此比較感興趣,想了解更多相關知識,不妨來關注一下動力節點的Java在線學習,里面的課程內容更加全面,從入門到精通都有,由淺到深,適合沒有基礎的朋友學習,希望對大家能夠有所幫助。
0基礎 0學費 15天面授
有基礎 直達就業
業余時間 高薪轉行
工作1~3年,加薪神器
工作3~5年,晉升架構
提交申請后,顧問老師會電話與您溝通安排學習