문서의 이전 판입니다!
/etc/my.cnf
/etc/mysql/my.cnf
/mysql/MyHome/etc/my.cnf
~/.my.cnf
# bin log 크기 제한. log-bin=/home/mysql_log/bin_log/bin # 빈로그 저장 설정 및 저장할 디렉토리 지정 binlog_cache_size = 2M # binlog cache 사이즈 max_binlog_size = 50M # bin로그 최대 파일 사이즈 expire_logs_days = 10 # 보관기간
# bin log 삭제 #log-bin ... #expire_logs_days = 10
*-bin.00000숫자
파일들과 .index
확장자의 파일을 백업하고 삭제하면 된다.[client] protocol=tcp # 로컬 접속시 소켓 대신 TCP 이용 강제 port=3306 # TCP 접속 기본 포트
/etc/my.cnf
[mysqld] max_connections = 250
show variables like 'max_connections';
[mysql] prompt=\u@\h:\d\_\R:\m:\\s>\_
ERROR 2003 (HY000): Can't connect to MySQL server on 'hostname' (111)
와 같은 오류가 발생했다.my.cnf
파일에 bind-address = 127.0.0.1
항목이 있기 때문이다. 이 항목이 있으면 127.0.0.1
에서 들어오는 요청만 허용한다.
MySQL 클라이언트가 MySQL 서버에 전송한 쿼리의 크기가 지나치게 클 때 발생하는 오류.
한 번에 많은 쿼리를 전송해야 할 경우 max_allowed_packet=16M
형태로 값을 지정해준다.
[mysqld] general_log_file = /var/log/mysql/mysql.log general_log = 1