mariadb通用配置

# The following options will be passed to all MariaDB clients
[client]
#password       = your_password
port            = 3306
socket=/home/datum/data/appdata/maria_data/sock/mysql.sock


# Here follows entries for some specific programs

# The MariaDB server
[mysqld]
port            = 3306
datadir=/home/datum/data/appdata/maria_data/dbdata
socket=/home/datum/data/appdata/maria_data/sock/mysql.sock
skip-external-locking
key_buffer_size = 256M
max_allowed_packet = 1M
table_open_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8


# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin


# binary logging format - mixed recommended
binlog_format=mixed


# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id       = 1


log-error=/home/datum/data/logs/mariadb/mysql.log
slow-query-log = 1
slow-query-log-file =/home/datum/data/logs/mariadb/mysql-slow.log
long_query_time =5
wait_timeout=2147483
interactive_timeout=2147483


#10s per transaction
innodb_lock_wait_timeout=10


#mysql 事件计划开启
event_scheduler=1


# from net  http://www.tuicool.com/articles/a6jeiu   http://www.jb51.net/article/58537.htm
# 启用 InnoDB 的每张表一个数据文件设置
innodb_file_per_table=1
# 配置 MySQL 的线程缓存数量
thread_cache_size =32
# 配置 MySQL 的查询缓存容量。验证: show status like '%Qcache%';
query_cache_type=1
# query_cache_limit = 256K
# query_cache_min_res_unit = 2k
query_cache_size=128M


[mysqldump]
quick
max_allowed_packet = 16M


[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates


[myisamchk]
key_buffer_size = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M


[mysqlhotcopy]
interactive-timeout

猜你喜欢

转载自blog.csdn.net/lijunwyf/article/details/80003773