mysql 로그 기록 설정
/etc/my.cnf
# This group is read both both by the client and the server
# use it for options that affect everything
[client-server]
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
[mysqld]
datadir = /var/lib/mysql
socket = /var/lib/mysql/mysql.sock
symbolic-links = 0
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
query_cache_limit = 32M
thread_concurrency = 4
max_connections = 100 #200
slow_query_log = 1
slow-query-log_file = /var/lib/mysql/slow.log
long_query_time = 1
[mysql]
no-auto-rehash
[mysqld_safe]
log-error = /var/lib/mysql/localhost.log
pid-file = /var/lib/mysql/localhost.localdomain.pid
[mysqlhotcopy]
interactive-timeout
innodb_data_home_dir = /var/lib/mysql
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /var/lib/mysql
innodb_buffer_pool_size = 256M
innodb_additional_mem_pool_size = 20M
innodb_log_file_size = 64M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
[myisamchk]
key_buffer_size = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M
'DB > MySQL - MariaDB' 카테고리의 다른 글
MySQL -> Mariadb 이전 후 Select 쿼리 느려짐 (0) | 2020.06.08 |
---|---|
Mysql 세팅 (0) | 2020.05.08 |
DB 권한 (0) | 2019.04.28 |
2개의 데이터 간의 시간차이를 구하고 싶은데요. 밀리단위로요. (0) | 2017.10.03 |
다양한 단위의 시간차 (0) | 2017.10.03 |