温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

mysql5.7.21参数都有哪些

发布时间:2021-09-28 11:43:36 来源:亿速云 阅读:217 作者:柒染 栏目:MySQL数据库

这篇文章将为大家详细讲解有关mysql5.7.21参数都有哪些,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。

auto_increment_increment:表示自增长字段每次递增的量,其默认值是1,取值范围是1 .. 65535 

auto_increment_offset:表示自增长字段从那个数开始,他的取值范围是1 .. 65535

autocommit:自动提交

automatic_sp_privileges:控制着server是否自动分配execute和alter权限给创建routine的用户。 默认为1,自动赋权

avoid_temporal_upgrade:其作用是让我们能选择是否强制升级表结构

back_log:指出在MySQL暂时停止回答新请求之前的短时间内多少个请求可以被存在堆栈中

basedir:mysql安装的路径

big_tables:使大结果集通过保存所有临时集到文件。这个选项可以防止大多数“table full” 错误,但也会减缓对内存中的表的查询。

bind_address:MySQL服务对于TCP/IP连接仅监听单个网络套接字。这个套接字绑定单个地址。但对单个地址可能映射到多个网络接口。

binlog_cache_size:为每个session 分配的内存,在事务过程中用来存储二进制日志的缓存

binlog_checksum: CRC32或者none,设置为none可以兼容低版本

binlog_direct_non_transactional_updates:开启他,这样不管任何情况对非事务表的操作都将记录binlog,对于非事务引擎表,直接走日志,不走2pc提交

binlog_error_action:当遇到mysql不能写binlog时,报出异常,默认是ignore error不报错

binlog_format:指定binlog的日志格式,支持statement,row,mixed格式

binlog_group_commit_sync_delay:表示binlog提交后等待延迟多少时间再同步到磁盘,默认0,不延迟。设置延迟可以让多个事务在用一时刻提交,提高binlog组提交的并发数和效率,提高slave的吞吐量。全局动态变量,单位微妙,默认0,范围:0~1000000(1秒)。

binlog_group_commit_sync_no_delay_count:表示等待延迟提交的最大事务数,如果上面参数的时间没到,但事务数到了,则直接同步到磁盘。

binlog_group_commit_sync_delay:binlog_group_commit_sync_no_delay_count没有开启,则该参数也不会开启.全局动态变量,单位个数,默认0,范围:0~1000000

binlog_gtid_simple_recovery:MySQL5.7.7之后默认on,这个参数控制了当mysql启动或重启时,mysql在搜寻GTIDs时是如何迭代使用binlog文件。该参数为真时,mysql-server只需打开最老的和最新的这2个binlog文件,gtid_purged参数的值和gtid_executed参数的值可以根据这些文件中的Previous_gtids_log_event或者Gtid_log_event计算得出。这确保了当mysql-server重启或清理binlog时,只需打开2个binlog文件。当这个参数设置为off,在mysql恢复期间,为了初始化gtid_executed,所有以最新文件开始的binlog都要被检查。并且为了初始化gtid_purged,所有的binlog都要被检查。这可能需要非常长的时间,建议开启。

binlog_max_flush_queue_time:单位为微妙,用于从flush队列中取事务的超时时间,这主要是防止并发事务过高,导致某些事务的RT上升

binlog_order_commits:当设置为0时,事务可能以和binlog不相同的顺序被提交

binlog_row_image:FULL记录每一行的变更,minimal只记录影响后的行

binlog_rows_query_log_events 将原始的操作sql记录写入事件中

binlog_stmt_cache_size非事务语句缓存大小

block_encryption_mode默认aes-128-ecb,块加密模式

bulk_insert_buffer_size提高数据插入的效率,这个参数设置的是 bulk insert 的缓存大小,默认是 8M

character_set_client客户端使用的字符集

character_set_connection连接数据库的字符集设置类型

character_set_database数据库中某库使用的字符集

character_set_filesystem

character_set_results数据库给客户端返回时使用的数据库

character_set_server服务器安装时指定的字符集

character_set_system数据库系统使用的字符集

character_sets_dir:字符集安装的目录

check_proxy_users表示是否开启代理用户的功能

collation_connection连接数据库的字符校对规则

collation_database数据库中某库使用的字符集校对规则

collation_server服务器安装时指定的字符集校对规则

completion_type:0或no_chain,1:commit提交后开启一个事务,2提交后与数据库断开

concurrent_insert当concurrent_insert=0时,不允许并发插入功能。

当concurrent_insert=1时,允许对没有洞洞的表使用并发插入,新数据位于数据文件结尾(缺省)。

当concurrent_insert=2时,不管表有没有洞洞,都允许在数据文件结尾并发插入。(myisam)

connect_timeout mysql客户端在尝试与mysql服务器建立连接时,mysql服务器返回错误握手协议前等待客户端数据包的最大时限

core_file  corefile是Linux下程序崩溃时生成的文件,可以用来分析程序崩溃的原因,因为它内部包含了程序崩溃时的堆栈信息。

datadir 数据文件目录

date_format 日期格式

datetime_format 时间格式

default_authentication_plugin 默认密码认证插件

default_password_lifetime 默认密码生存时间(天)

default_storage_engine默认存储引擎

default_tmp_storage_engine表示临时表的默认存储引擎

default_week_format当调用WEEK()或YEARWEEK()函数时,如果不带可选的mode参数,则默认为此变量设置的那个模式值

delay_key_write对于使用DELAY_KEY_WRITE选项创建的MyISAM表,服务器是否需要延迟键写入。此变量由以下3中可取值。

ON(默认值)。此时,服务器会根据DELAY_KEY_WRITE选项的值进行操作;如果表时用DELAY_KEY_WRITE=1选项创建的,则延迟键写入;如果表使用DELAY_KEY_WRITE=0选项创建的,则不延迟。

OFF。它表示的是,对任务表都不延迟键写入,不管它们是如何定义的。

ALL。它表示的是,对任务表都总是延迟键写入,不管它们是如何定义的。

比较常见的做法是,在运行复制从服务器时将delay_key_write设置为ALL,以提高MyISAM表的性能(不管这些表最初是如何被创建的,都延迟其键写入)。

delayed_insert_limit它指的是该表的延迟行处理器在检查表是否有新的SELECT语句到来之前插入的源自INSERT DELAYED语句的行数量。如果有语句到达,则将插入操作挂起,以便检索操作能够得到执行。

delayed_insert_timeout当INSERT DELAYED操作的处理器插入完排队的各个行是,它会等待dealyed_insert_timeout秒,检查一下是否有新的INSERT DELAYED行到达。如果有行到达,则继续插入;否则终止插入操作。

delayed_queue_size每个表针对INSERT DELAYED有可以排入队列的行数量。当队列排满时,则会有更多针对该表的INSERT DELAYED语句被阻塞,一直到队列拥有足够的空间为止。

disabled_storage_engines不支持的存储引擎

disconnect_on_expired_password用于控制客户端如何处理失效的密码,默认打开

div_precision_increment在使用操作符/对两个精确数值做除法运算时,此变量表示的是需要增加的精度位数。例如,当div_precision_increment的值为4或6时,.1/.7的结果分别为.14286或0.1428571。此变量的取值范围是0~30,默认为4。

end_markers_in_json

enforce_gtid_consistency开启gtid的一些安全限制(介意开启)

eq_range_index_dive_limit简单说,选项 eq_range_index_dive_limit 的值设定了 IN列表中的条件个数上线,超过设定值时,会将执行计划从 1 变成 2。

event_scheduler事件计划

expire_logs_days日志过期时间

explicit_defaults_for_timestamp

flush是否启用同步表数据到磁盘以及自动同步的间隔时间

flush_time是否启用同步表数据到磁盘以及自动同步的间隔时间

foreign_key_checks是否开启外检检查

ft_boolean_syntax表示需要被全文索引的字段通过以上这些变量进行分词切分

ft_max_word_len最大分词长度,一般情况下不需要更改

ft_min_word_len最小分词长度,一般情况下修改为1

ft_query_expansion_limitMyISAM引擎表使用 with query expansion 进行全文搜索的最大匹配数

ft_stopword_file表示过滤掉不索引的词表, 一行一个

general_log 是否开启全量日志

general_log_file全量日志文件路径

group_concat_max_lengroup_concat连接字段的时候是有长度限制的,并不是有多少连多少,可用过该变量设置

gtid_executed它是一组包含已经记录在二进制日志文件中的事务集合 

gtid_executed_compression_period用来控制每执行多少个事务,对此表进行压缩,默认值为1000

gtid_mode是否开启开启GTID模式

gtid_owned表示正在执行的事务的gtid以及对应的线程ID

gtid_purged已经被删除的binlog的事务,它是GTID_EXECUTED的子集,从MySQL5.6.9开始,该变量无法被设置

have_compress zlib压缩库是否能为MySQL服务器所用

have_crypt crypt()系统调用是否可为MySQL服务器所用

have_dynamic_loadingmysqld支持动态加载插件时为YES,否则为NO

have_geometry mysqld支持空间数据类型时为YES,否则为NO

have_openssl此为have_ssl选项的别名

have_profiling mysqld支持语句性能分析时则为YES,否则为NO。如果支持profiling功能,则--profiling变量则用于控制是否启动此功能。

have_query_cache mysqld支持查询缓存则为YES,否则为NO。

have_rtree_keys mysqld支持RTREE索引则为YES,否则为NO。RTREE索引用于MyISAM表的空间索引。

have_ssl mysqld支持SSL连接时为YES,否则为NO

have_statement_timeout

have_symlink mysqld支持符号链接则为YES,否则为NO。在Unix主机上,此功能对数据目录和索引目录有用。

host_cache_size 为加快主机名到IP解析禁用使用内部主机缓存

hostname 主机名

ignore_builtin_innodb

ignore_db_dirs用于控制是否忽略DATA目录下的db目录,多个用多行分开

init_connect 是用户登录到数据库上之后,在执行第一次查询之前执行 里面的内容的

init_file 有时候我们希望MySQL能够在启动时做一些数据库的操作,比如把索引加入cache等等。因为有些配置会在MySQL重启后失效,重启后我们就可以通过init_file这个参数让MySQL重新执行一些SQL语句。

init_slave

innodb_adaptive_flushing

innodb_adaptive_flushing_lwm

innodb_adaptive_hash_index

innodb_adaptive_hash_index_parts

innodb_adaptive_max_sleep_delay

innodb_api_bk_commit_interval

innodb_api_disable_rowlock

innodb_api_enable_binlog

innodb_api_enable_mdl

innodb_api_trx_level

innodb_autoextend_increment

innodb_autoinc_lock_mode

innodb_buffer_pool_chunk_size

innodb_buffer_pool_dump_at_shutdown

innodb_buffer_pool_dump_now

innodb_buffer_pool_dump_pct

innodb_buffer_pool_filename

innodb_buffer_pool_instances

innodb_buffer_pool_load_abort

innodb_buffer_pool_load_at_startup

innodb_buffer_pool_load_now

innodb_buffer_pool_size

innodb_change_buffer_max_size

innodb_change_buffering

innodb_checksum_algorithm

innodb_checksums

innodb_cmp_per_index_enabled

innodb_commit_concurrency

innodb_compression_failure_threshold_pct

innodb_compression_level

innodb_compression_pad_pct_max

innodb_concurrency_tickets

innodb_data_file_path

innodb_data_home_dir

innodb_deadlock_detect

innodb_default_row_format

innodb_disable_sort_file_cache

innodb_doublewrite

innodb_fast_shutdown

innodb_file_format

innodb_file_format_check

innodb_file_format_max

innodb_file_per_table

innodb_fill_factor

innodb_flush_log_at_timeout

innodb_flush_log_at_trx_commit

innodb_flush_method

innodb_flush_neighbors

innodb_flush_sync

innodb_flushing_avg_loops

innodb_force_load_corrupted

innodb_force_recovery

innodb_ft_aux_table

innodb_ft_cache_size

innodb_ft_enable_diag_print

innodb_ft_enable_stopword

innodb_ft_max_token_size

innodb_ft_min_token_size

innodb_ft_num_word_optimize

innodb_ft_result_cache_limit

innodb_ft_server_stopword_table

innodb_ft_sort_pll_degree

innodb_ft_total_cache_size

innodb_ft_user_stopword_table

innodb_io_capacity

innodb_io_capacity_max

innodb_large_prefix

innodb_lock_wait_timeout

innodb_locks_unsafe_for_binlog

innodb_log_buffer_size

innodb_log_checksums

innodb_log_compressed_pages

innodb_log_file_size

innodb_log_files_in_group

innodb_log_group_home_dir

innodb_log_write_ahead_size

innodb_lru_scan_depth

innodb_max_dirty_pages_pct

innodb_max_dirty_pages_pct_lwm

innodb_max_purge_lag

innodb_max_purge_lag_delay

innodb_max_undo_log_size

innodb_monitor_disable

innodb_monitor_enable

innodb_monitor_reset

innodb_monitor_reset_all

innodb_numa_interleave

innodb_old_blocks_pct

innodb_old_blocks_time

innodb_online_alter_log_max_size

innodb_open_files

innodb_optimize_fulltext_only

innodb_page_cleaners

innodb_page_size

innodb_print_all_deadlocks

innodb_purge_batch_size

innodb_purge_rseg_truncate_frequency

innodb_purge_threads

innodb_random_read_ahead

innodb_read_ahead_threshold

innodb_read_io_threads

innodb_read_only

innodb_replication_delay

innodb_rollback_on_timeout

innodb_rollback_segments

innodb_sort_buffer_size

innodb_spin_wait_delay

innodb_stats_auto_recalc

innodb_stats_include_delete_marked

innodb_stats_method

innodb_stats_on_metadata

innodb_stats_persistent

innodb_stats_persistent_sample_pages

innodb_stats_sample_pages

innodb_stats_transient_sample_pages

innodb_status_output

innodb_status_output_locks

innodb_strict_mode

innodb_support_xa

innodb_sync_array_size

innodb_sync_spin_loops

innodb_table_locks

innodb_temp_data_file_path

innodb_thread_concurrency

innodb_thread_sleep_delay

innodb_tmpdir

innodb_undo_directory

innodb_undo_log_truncate

innodb_undo_logs

innodb_undo_tablespaces

innodb_use_native_aio

innodb_version

innodb_write_io_threads

interactive_timeout

internal_tmp_disk_storage_engine

join_buffer_size

keep_files_on_create

key_buffer_size

key_cache_age_threshold

key_cache_block_size

key_cache_division_limit

large_files_support

large_page_size

large_pages

lc_messages

lc_messages_dir

lc_time_names

license

local_infile

lock_wait_timeout

locked_in_memory

log_bin

log_bin_basename

log_bin_index

log_bin_trust_function_creators

log_bin_use_v1_row_events

log_builtin_as_identified_by_password

log_error

log_error_verbosity

log_output

log_queries_not_using_indexes

log_slave_updates

log_slow_admin_statements

log_slow_slave_statements

log_statements_unsafe_for_binlog

log_syslog

log_syslog_facility

log_syslog_include_pid

log_syslog_tag

log_throttle_queries_not_using_indexes

log_timestamps

log_warnings

long_query_time

low_priority_updates

lower_case_file_system

lower_case_table_names

maintain_user_list

master_info_repository

master_verify_checksum

max_allowed_packet

max_binlog_cache_size

max_binlog_size

max_binlog_stmt_cache_size

max_connect_errors

max_connections

max_delayed_threads

max_digest_length

max_error_count

max_execution_time

max_heap_table_size

max_insert_delayed_threads

max_join_size

max_length_for_sort_data

max_points_in_geometry

max_prepared_stmt_count

max_relay_log_size

max_seeks_for_key

max_sort_length

max_sp_recursion_depth

max_tmp_tables

max_user_connections

max_write_lock_count

metadata_locks_cache_size

metadata_locks_hash_instances

min_examined_row_limit

multi_range_count

myisam_data_pointer_size

myisam_max_sort_file_size

myisam_mmap_size

myisam_recover_options

myisam_repair_threads

myisam_sort_buffer_size

myisam_stats_method

myisam_use_mmap

mysql_native_password_proxy_users

net_buffer_length

net_read_timeout

net_retry_count

net_write_timeout

new

ngram_token_size

offline_mode

old

old_alter_table

old_passwords

open_files_limit

opt_rds_audit_log_enabled

opt_rds_enable_show_slave_lag

opt_rds_last_error_gtid

optimizer_prune_level

optimizer_search_depth

optimizer_switch

optimizer_trace

optimizer_trace_features

optimizer_trace_limit

optimizer_trace_max_mem_size

optimizer_trace_offset

parser_max_mem_size

performance_schema

performance_schema_accounts_size

performance_schema_digests_size

performance_schema_events_stages_history_long_size

performance_schema_events_stages_history_size

performance_schema_events_statements_history_long_size

performance_schema_events_statements_history_size

performance_schema_events_transactions_history_long_size

performance_schema_events_transactions_history_size

performance_schema_events_waits_history_long_size

performance_schema_events_waits_history_size

performance_schema_hosts_size

performance_schema_max_cond_classes

performance_schema_max_cond_instances

performance_schema_max_digest_length

performance_schema_max_file_classes

performance_schema_max_file_handles

performance_schema_max_file_instances

performance_schema_max_index_stat

performance_schema_max_memory_classes

performance_schema_max_metadata_locks

performance_schema_max_mutex_classes

performance_schema_max_mutex_instances

performance_schema_max_prepared_statements_instances

performance_schema_max_program_instances

performance_schema_max_rwlock_classes

performance_schema_max_rwlock_instances

performance_schema_max_socket_classes

performance_schema_max_socket_instances

performance_schema_max_sql_text_length

performance_schema_max_stage_classes

performance_schema_max_statement_classes

performance_schema_max_statement_stack

performance_schema_max_table_handles

performance_schema_max_table_instances

performance_schema_max_table_lock_stat

performance_schema_max_thread_classes

performance_schema_max_thread_instances

performance_schema_session_connect_attrs_size

performance_schema_setup_actors_size

performance_schema_setup_objects_size

performance_schema_users_size

pid_file

plugin_dir

port

preload_buffer_size

profiling

profiling_history_size

protocol_version

query_alloc_block_size

query_cache_limit

query_cache_min_res_unit

query_cache_size

query_cache_type

query_cache_wlock_invalidate

query_prealloc_size

range_alloc_block_size

range_optimizer_max_mem_size

rbr_exec_mode

rds_audit_last_log_row

rds_audit_log_dir

rds_audit_log_file

rds_audit_log_row

rds_audit_log_version

rds_audit_max_sql_size

rds_audit_row_limit

rds_check_core_file_enabled

rds_force_myisam_to_innodb

rds_global_access

rds_is_dump_thread

rds_kill_connections

rds_proxy_user_list

rds_release_date

rds_reserved_connections

rds_result_skip_counter

rds_set_connection_id_enabled

rds_trx_changes_idle_timeout

rds_trx_idle_timeout

rds_trx_readonly_idle_timeout

rds_user_with_kill_option

rds_version

read_buffer_size

read_only

read_rnd_buffer_size

relay_log

relay_log_basename

relay_log_index

relay_log_info_file

relay_log_info_repository

relay_log_purge

relay_log_recovery

relay_log_space_limit

report_host

report_password

report_port

report_user

require_secure_transport

rpl_semi_sync_master_enabled

rpl_semi_sync_master_timeout

rpl_semi_sync_master_trace_level

rpl_semi_sync_master_wait_for_slave_count

rpl_semi_sync_master_wait_no_slave

rpl_semi_sync_master_wait_point

rpl_semi_sync_slave_enabled

rpl_semi_sync_slave_trace_level

rpl_stop_slave_timeout

secure_auth

secure_file_priv

server_id

server_id_bits

server_uuid

session_track_gtids

session_track_schema

session_track_state_change

session_track_system_variables

session_track_transaction_info

sha256_password_proxy_users

show_compatibility_56

show_old_temporals

skip_external_locking

skip_name_resolve

skip_networking

skip_show_database

slave_allow_batching

slave_checkpoint_group

slave_checkpoint_period

slave_compressed_protocol

slave_exec_mode

slave_load_tmpdir

slave_max_allowed_packet

slave_net_timeout

slave_parallel_type

slave_parallel_workers

slave_pending_jobs_size_max

slave_preserve_commit_order

slave_rows_search_algorithms

slave_skip_errors

slave_sql_verify_checksum

slave_transaction_retries

slave_type_conversions

slow_launch_time

slow_query_log

slow_query_log_file

socket

sort_buffer_size

sql_auto_is_null

sql_big_selects

sql_buffer_result

sql_log_off

sql_mode

sql_notes

sql_quote_show_create

sql_safe_updates

sql_select_limit

sql_slave_skip_counter

sql_warnings

ssl_ca

ssl_capath

ssl_cert

ssl_cipher

ssl_crl

ssl_crlpath

ssl_key

stored_program_cache

super_read_only

sync_binlog

sync_frm

sync_master_info

sync_relay_log

sync_relay_log_info

system_time_zone

table_definition_cache

table_open_cache

table_open_cache_instances

thread_cache_size

thread_handling

thread_stack

time_format

time_zone

tls_version

tmp_table_size

tmpdir

transaction_alloc_block_size

transaction_isolation

transaction_prealloc_size

transaction_read_only

transaction_write_set_extraction

tx_isolation

tx_read_only

unique_checks

updatable_views_with_limit

version

version_comment

version_compile_machine

version_compile_os

wait_timeout

关于mysql5.7.21参数都有哪些就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI