首页 > 数据库 >MySQL 8 配置文件

MySQL 8 配置文件

时间:2023-06-13 14:22:04浏览次数:68  
标签:log 配置文件 settings buffer max innodb MySQL size

#[client]
#user = root
#password = 1111aaA_

[mysql]
prompt = "\u@mysqldb \R:\m:\s [\d]> "
no-auto-rehash

[mysqld_safe]
malloc-lib=tcmalloc

[mysqldump]
single-transaction

[mysqld]
#basic settings#
server-id = 11
port = 3306
user = mysql
bind_address = 10.100.172.43
autocommit = 1
character_set_server=utf8mb4
datadir=/data/mysql/
explicit_defaults_for_timestamp = 1
sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
transaction_isolation = READ-COMMITTED
max_allowed_packet = 64M
event_scheduler = 1
#connection#
interactive_timeout = 1800
wait_timeout = 1800
lock_wait_timeout = 1800
skip_name_resolve = 1
max_connections = 1024
max_user_connections = 256
max_connect_errors = 1000000
#table cache performance settings#
table_open_cache = 4096
table_definition_cache = 4096
table_open_cache_instances = 64
#session memory settings#
read_buffer_size = 16M
read_rnd_buffer_size = 32M
sort_buffer_size = 32M
tmp_table_size = 64M
join_buffer_size = 128M
thread_cache_size = 64
#log settings#
log_error = error.log
log_bin = binlog
log_error_verbosity = 2
slow_query_log = 1
slow_query_log_file = slow.log
log_queries_not_using_indexes = 1
log_slow_admin_statements = 1
log_slow_replica_statements = 1
log_throttle_queries_not_using_indexes = 10
binlog_expire_logs_seconds = 864000
long_query_time = 2
min_examined_row_limit = 100
log-bin-trust-function-creators = 1
########innodb settings########
innodb_page_size = 16k
innodb_buffer_pool_size = 4G
innodb_buffer_pool_instances = 8
innodb_buffer_pool_load_at_startup = 1
innodb_buffer_pool_dump_at_shutdown = 1
innodb_lru_scan_depth = 4096
innodb_lock_wait_timeout = 5
innodb_io_capacity = 10000
innodb_io_capacity_max = 12000
innodb_flush_method = O_DIRECT
innodb_flush_neighbors = 0
innodb_redo_log_capacity = 6G
innodb_log_buffer_size = 64M
innodb_purge_threads = 4
innodb_thread_concurrency = 4
innodb_print_all_deadlocks = 1
innodb_strict_mode = 1
innodb_sort_buffer_size = 64M
innodb_write_io_threads = 4
innodb_read_io_threads = 4
innodb_file_per_table = 1
innodb_stats_persistent_sample_pages = 64
innodb_autoinc_lock_mode = 2
innodb_online_alter_log_max_size=100M
innodb_open_files=4096
innodb_flush_log_at_trx_commit = 1
#replication settings#
sync_binlog = 1
gtid_mode = on
enforce_gtid_consistency = 1
binlog_format = ROW
binlog_rows_query_log_events = 1
relay_log = relay.log
relay_log_recovery = 1
log_replica_updates = 1
replica_skip_errors = ddl_exist_errors
replica_parallel_workers = 16
replica_preserve_commit_order = 1
replica_transaction_retries = 128
binlog_gtid_simple_recovery = 1
log_timestamps = system
#semi sync replication settings#
plugin-load = "group_replication.so;validate_password.so;semisync_master.so;semisync_slave.so"
loose_rpl_semi_sync_master_enabled = 1
loose_rpl_semi_sync_master_timeout = 3000
loose_rpl_semi_sync_slave_enabled = 1
#perforamnce_schema settings#
performance-schema-instrument='memory/%=COUNTED'
performance_schema_digests_size = 40000
performance_schema_max_table_handles = 40000
performance_schema_max_table_instances = 40000
performance_schema_max_sql_text_length = 4096
performance_schema_max_digest_length = 4096
loose_innodb_numa_interleave = 1
innodb_buffer_pool_dump_pct = 40
innodb_page_cleaners = 4
innodb_undo_log_truncate = 1
innodb_max_undo_log_size = 4G
innodb_purge_rseg_truncate_frequency = 128

 

标签:log,配置文件,settings,buffer,max,innodb,MySQL,size
From: https://www.cnblogs.com/gavin-zheng/p/17477385.html

相关文章

  • mysql数据库备份及恢复命令mysqldump,source的用法
    还原一个数据库:mysql-hlocalhost-uroot-p123456www<c:/www.sql备份一个数据库:mysqldump-hlocalhost-uroot-p123456www>d:/www2008-2-26.sql  //以下是在程序中进行测试//$command="mysqldump--opt-h$dbhost-u$dbuser-p$dbpass$dbname|gzip>$backup......
  • NET CORE Configuraion 使用详解 获取配置文件参数 读取环境变量、读取配置文件、读取
    NETCOREConfiguraion使用详解获取配置文件参数读取环境变量、读取配置文件、读取Ini配置、读取Xml配置、多源配置读取顺序分析https://blog.csdn.net/qq_32109957/article/details/127998326相关配置<ProjectSdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Ex......
  • nodejs 和 mysql 连接
      原文https://www.mysqltutorial.org/mysql-nodejs/connect/   letmysql=require('mysql')letconnection=mysql.createConnection({host:'119.91.31.144',user:'test1',password:'',//密码database:......
  • MySQL读取的记录和我想象的不一致
    摘要:并发的事务在运行过程中会出现一些可能引发一致性问题的现象,本篇将详细分析一下。本文分享自华为云社区《MySQL读取的记录和我想象的不一致——事物隔离级别和MVCC》,作者:砖业洋__。事务的特性简介1.1原子性(Atomicity)要么全做,要么全不做,一系列操作都是不可分割的,如果在执......
  • FTP配置文件文件详解
    设置匿名用户访问FTPanonymous_enable=YES//设置是否允许匿名用户登录FTP服务器,默认为YES。  write_enable=YES//是否对登录用户开启写权限,属全局性设置,默认NO。local_enable=YES//是否允许本地用户登录FTP服务器,默认为NO。ftp_userna......
  • 压缩包版MySQL8安装
    1、下载解压链接:https://pan.baidu.com/s/11OxndQSx9GVP30chaGf7uA?pwd=1mfh提取码:1mfh2、新建ini文件在MySQL根目录新建(具有bin文件夹那一级)[mysqld]<!--设置3306端口-->port=3306<!--设置mysql的安装目录-->basedir=D:\File\Mysql\mysql-8.0.22-winx64<!--设置mysql......
  • 【MySQL的CheckPoint技术】
    MySQL的CheckPoint(CheckPoint)技术,又称"redolog"(Redolog),是MySQL数据库的核心技术之一,其目的是在发生故障或故障时,保证数据库中存储的数据可以得到有效的修复。对数据库进行的修改,包括写入,更新,删除等,都要进行相应的文档化,以确保数据在任何时候都是一致的。如何使用MySQL检查......
  • centos7 虚拟机安装 MySQL数据库
    检查是否安装过MySQL以及版本信息rpm-qa|grep-imysql卸载之前的版本,参数-e表示删除,-nodeps表示不校验依赖关系rpm-emysql-5.1.47-4.el6.x86_64–nodeps二进制包格式安装的mysql卸载如果我们的mysql是通过二级制包格式安装的,则rpm-qa|grep-imysql是......
  • Ubuntu-20.04.6-server安装MySQL实现远程连接
    Ubuntu-20.04.6-server安装MySQL,修改密码安装MySQL一、查看是否安装数据库mysql--version二、更新系统中的所有软件包和存储库sudoaptupdate三、安装Mysql最新版(我这里已经安装好了)sudoaptinstallmysql-server四、安装成功后,mysql--version查看版本五、查......
  • thunderBird如何选择配置文件
    有时候,thunderBird会出现配置文件太老的提示,然后就不能用了,让你重新配置,这可烦死了。其实配置文件信息还在的,只是需要重新配置,选择配置文件。 只要在windows命令行下,找到thunderBird的安装位置,Programfiles(x86),然后运行命令:thunderBird.exe-ProfileManager然后会跳出一......