Mysql 配置文件和目录的合理分配
记得给权限呀, 权限呀, 都是泪
多实例
单实例
配置文件
[client]
port = 3301
socket = /data/mysql3301/data/mysqld3301.sock [mysqld_safe]
socket = /data/mysql3301/data/mysqld3301.sock
nice = 0
#flush-caches
numa-interleave [mysql]
port = 3301
socket = /data/mysql3301/data/mysqld3301.sock
no_auto_rehash
default_character_set = utf8
prompt = \u@\h:\p:[\d]> [mysqldump]
quick
quote-names
max_allowed_packet = 16M [mysqld]
# GENERAL #
user = mysqldb
port = 3301
default_storage_engine = InnoDB
socket = /data/mysql3301/data/mysqld3301.sock
pid_file = /data/mysql3301/data/mysqld3301.pid
server-id = 6501 # Charset #
init_connect = 'SET collation_connection = utf8mb4_unicode_ci'
init_connect = 'SET NAMES utf8mb4'
character-set-server = utf8mb4
character-set-client = utf8mb4
collation-server = utf8mb4_unicode_ci
skip-character-set-client-handshake
explicit_defaults_for_timestamp=true # MyISAM #
key_buffer_size = 32M
myisam_recover = FORCE,BACKUP # SAFETY #
max_allowed_packet = 16M
max_connect_errors = 1000000
skip_name_resolve
innodb = FORCE # DATA STORAGE #
datadir = /data/mysql3301/data # BINARY LOGGING #
log_bin = /data/mysql3301/binlog/mysql-bin
log_bin_index = /data/mysql3301/binlog/mysql-bin.index
expire_logs_days = 7
sync_binlog = 1
binlog_format = ROW
binlog_cache_size = 4M
max_binlog_size = 1G
max_binlog_cache_size = 100M # CACHES AND LIMITS #
tmp_table_size = 32M
max_heap_table_size = 32M
query_cache_type = 0
query_cache_size = 0
max_connections = 5000
max_user_connections = 5000
thread_cache_size = 100
open_files_limit = 65536
table_definition_cache = 10240
table_open_cache = 10240
thread_handling = pool-of-threads
thread_pool_oversubscribe = 10 # INNODB #
innodb_flush_method = O_DIRECT
innodb_log_files_in_group = 2
innodb_log_file_size = 512M
innodb_log_buffer_size = 64M
innodb_flush_log_at_trx_commit = 2
innodb_file_per_table = 1
innodb_open_files = 1024
innodb_buffer_pool_size = 1
#innodb_buffer_pool_populate = 1
innodb_additional_mem_pool_size = 32M
innodb_print_all_deadlocks = 1
innodb_log_group_home_dir = /data/mysql3301/innolog
innodb_data_home_dir = /data/mysql3301/innodata # REPLICATION #
skip_slave_start = 1
#replicate-wild-ignore-table = mysql.%
replicate-wild-ignore-table = information_schema.%
replicate-wild-ignore-table = performance_schema.%
relay_log = /data/mysql3301/relaylog/relay-bin
relay-log-index = /data/mysql3301/relaylog/relay-bin.index
sync_master_info = 1
sync_relay_log = 1
sync_relay_log_info = 1
read_only = 0 # LOGGING #
log_error = /data/mysql3301/log/mysql-error.log
log_queries_not_using_indexes = 1
long_query_time = 1
slow_query_log = 1
slow_query_log_file = /data/mysql3301/log/mysql-slow.log
general_log = OFF
general_log_file = /data/mysql3301/log/mysql-general.log
[client]
port =
socket = /data/mysql8./mysql.sock [mysqld_safe]
socket = /data/mysql8./mysql.sock
nice =
#flush-caches
numa-interleave [mysql]
port =
socket = /data/mysql8./mysql.sock
no_auto_rehash
default_character_set = utf8
prompt = \u@\h:\p:[\d]> [mysqldump]
quick
quote-names
max_allowed_packet = 16M [mysqld]
#skip-grant-tables
default_authentication_plugin = mysql_native_password
# GENERAL #
user = mysql
port =
default_storage_engine = InnoDB
socket = /data/mysql8./mysql.sock
#pid_file = /data/mysql8./mysqld.pid
pid_file = /data/mysql8./mysqld.pid
server-id = # Charset #
init_connect = 'SET collation_connection = utf8mb4_unicode_ci'
init_connect = 'SET NAMES utf8mb4'
character-set-server = utf8mb4
#character-set-client = utf8mb4
collation-server = utf8mb4_unicode_ci
skip-character-set-client-handshake
explicit_defaults_for_timestamp=true # MyISAM #
key_buffer_size = 32M
#myisam_recover = FORCE,BACKUP # SAFETY #
max_allowed_packet = 16M
max_connect_errors =
skip_name_resolve
innodb = FORCE # DATA STORAGE #
datadir = /data/mysql8. # BINARY LOGGING #
log_bin = /data/mysql8./mysql-bin
log_bin_index = /data/mysql8./mysql-bin.index
expire_logs_days =
sync_binlog =
binlog_format = ROW
binlog_cache_size = 4M
max_binlog_size = 1G
max_binlog_cache_size = 100M # CACHES AND LIMITS #
tmp_table_size = 32M
max_heap_table_size = 32M
# query_cache_type =
# query_cache_size =
max_connections =
max_user_connections =
thread_cache_size =
open_files_limit =
table_definition_cache =
table_open_cache =
#thread_handling = pool-of-threads
# thread_pool_oversubscribe = # INNODB #
innodb_flush_method = O_DIRECT
innodb_log_files_in_group =
innodb_log_file_size = 512M
innodb_log_buffer_size = 64M
innodb_flush_log_at_trx_commit =
innodb_file_per_table =
innodb_open_files =
innodb_buffer_pool_size =
#innodb_buffer_pool_populate =
# innodb_additional_mem_pool_size = 32M
innodb_print_all_deadlocks =
innodb_log_group_home_dir = /data/mysql8.
innodb_data_home_dir = /data/mysql8. # REPLICATION #
skip_slave_start =
#replicate-wild-ignore-table = mysql.%
replicate-wild-ignore-table = information_schema.%
replicate-wild-ignore-table = performance_schema.%
relay_log = /data/mysql8./relay-bin
relay-log-index = /data/mysql8./relay-bin.index
sync_master_info =
sync_relay_log =
sync_relay_log_info =
read_only = # LOGGING #
log_error = /data/mysql8./mysqld.log
log_queries_not_using_indexes =
long_query_time =
slow_query_log =
#slow_query_log_file = /data/mysql8./mysql-slow.log
general_log = OFF
#general_log_file = /data/mysql8./mysql-general.log
mysql8.0的配置文件
Mysql 配置文件和目录的合理分配的更多相关文章
- MySQL配置文件my.cnf 例子最详细翻译
转的 MySQL配置文件my.cnf 例子最详细翻译,可以保存做笔记用. #BEGIN CONFIG INFO#DESCR: 4GB RAM, 只使用InnoDB, ACID, 少量的连接, 队列负载 ...
- mysql配置文件my.cnf详解
原文地址:mysql配置文件my.cnf详解 作者:gron basedir = path 使用给定目录作为根目录(安装目录). character-sets-dir = path 给出存放着字符集的 ...
- MySQL配置文件改变了datadir值
从Noinstall Zip Archive中安装MySQL正在从Noinstall软件包安装MySQL的用户可以使用这个说明来手动安装MySQL.从Zip archive 中安装MySQL的 步骤如 ...
- mysql配置文件转载
#BEGIN CONFIG INFO#DESCR: 4GB RAM, 只使用InnoDB, ACID, 少量的连接, 队列负载大#TYPE: SYSTEM#END CONFIG INFO ## 此my ...
- MySQL 配置文件my.cnf
转载: MySQL配置文件my.cnf 详解:#BEGIN CONFIG INFO#DESCR: 4GB RAM, 只使用InnoDB, ACID, 少量的连接, 队列负载大#TYPE: SYSTEM ...
- Mysql配置文件my.ini详解
以下是Mysql数据库服务器配置文件my.ini的详细配置.应用场合是InnoDB引擎,2核CPU, 32位SUSE. [client] #password = your_password port ...
- linux下mysql配置文件my.cnf最详细解释
MySQL配置文件在Windows下叫my.ini,在MySQL的安装根目录下:在Linux下叫my.cnf,该文件位于/etc/my.cnf. 可以查找下:find / -name my.cnf m ...
- MySQL配置文件my.cnf中文详解
#BEGIN CONFIG INFO #DESCR: 4GB RAM, 只使用InnoDB, ACID, 少量的连接, 队列负载大 #TYPE: SYSTEM #END CONFIG INFO # # ...
- linux下mysql安装、目录结构、配置
1.准备安装程序(官方网站下载) 服务端:MySQL-server-community-5.1.44-1.rhel4.i386.rpm 客户端:MySQL-client-community-5.1.4 ...
随机推荐
- haproxy rpm制做
[root@c01 tmp]# fpm -s dir -t rpm -v 1.7.7 -n haproxy --before-install /tmp/haproxy_before.sh --afte ...
- Java中List详解
List是Java中比较常用的集合类,关于List接口有很多实现类,本文就来简单介绍下其中几个重点的实现ArrayList.LinkedList和Vector之间的关系和区别. List List 是 ...
- .NET MVC5+ Dapper+扩展+微软Unity依赖注入实例
1.dapper和dapper扩展需要在线安装或者引用DLL即可 使用nuget为项目增加Unity相关的包 2.model类 public class UserInfo { public int I ...
- lua的模块加载require
加载指定的模块.首先函数会在 package.loaded 这个表中查看是否已经加载 了 modname 这个模块.如果是,那么 require 会返回保存在 package.loaded[modna ...
- 缩放图片,解决bitmap 内存溢出out of memory的问题
很多人在android开发中都遇到了生成bitmap时候内存溢出,也就是out of memory(OOM)的问题,网上对这样的问题的的解决说法不一.笔者作为一个初级开发者,在这里向大家提供一种比较实 ...
- 序列化ADODataSet, ADOQuery
经过昨天晚上一折腾把做了一个DIOCP直接传递TADOQuery的Demo,在google上找了一系列的资料. 这样服务端可以直接将TADOQuery查询出来的数据直接转换成TStream自己进行传递 ...
- 【delphi】TStringList类常用属性方法详解
TStringList 常用方法与属性 var List: TStringList; i: Integer; begin List := TStringList.Create; List.Add('S ...
- windows下使用mingw编译出ffplay(简化版)
之前编译FFmpeg直接使用dll.lib,默认的mingw也不会编译出ffplay.exe. 近期由于工作需要,需要验证下修改之后的FFmpeg版本是否正常,需要使用ffplay.exe. 比较暴力 ...
- Office_Visio_Pro_2007
Office_Visio_Pro_2007http://pan.baidu.com/share/link?shareid=473782&uk=3474501992 解压后在文件夹里找到密钥[一 ...
- idea Error:(1, 10) java: 需要class, interface或enum, 未结束的字符串文字,Error:(55, 136) java: 非法字符: \65533
1.未结束的字符串文字,Error:(55, 136) java: 非法字符: \65533 这些乱七吧八遭的错误如果很多的话 , 尝试 重新修改下生成目录 修改下语言等级 上述方法都不行 ,还报错 ...