slow query 설정
/etc/my.cnf 수정
[mysqld]
long_query_time = 3
log_output = 'TABLE' of 'FILE'
slow_query_log = 1
slow_query_log_file = /var/log/mysql/mysql-slow.log
max_user_connections=500;
max_connections=500;
-------------------
[performance_schema] table on필요
statements_digest
events_statements_history_long
--------------------
[바로설정]
SET global log_output = 'table';
set global long_query_time = 3;
set global slow_query_log = 1;
set global long_query_log_file = 'slow-queries.log';
set global general_log=1;
set global general_log_file = '';
select @@general_log;
select @@general_log_file;
[에러로그 위치]
/var/log/mysqld.log
[max connection 설정]
GRANT USAGE ON *.* TO 'root'@'%' with MAX_USER_CONNECTIONS 500;
'Database' 카테고리의 다른 글
[AWS] MySQL 설치 (0) | 2016.08.22 |
---|---|
MySQL 설치 (우분투) (0) | 2016.08.17 |
MySQL 설치(CentOS) (0) | 2016.08.17 |