티스토리 뷰
카테고리 없음
SQLSTATE[HY001]: Memory allocation error: 1038 Out of sort memory, consider increasing server sort buffer size
rediate.will 2022. 1. 17. 09:47먼저 수정 해야 할 파일의 위치를 알아야한다.
sort_buffer_size를 조정 해야하는데, my.cnf파일에 추가 해야한다.
위치를 알아보자.
➜ / mysql --help | grep my.cnf
order of preference, my.cnf, $MYSQL_TCP_PORT,
/etc/my.cnf /etc/mysql/my.cnf /opt/homebrew/etc/my.cnf ~/.my.cnf
이렇게 표시된다.
그리고 보통은
/usr/local/etc/my.cnf
/usr/local/Cellar/mariadb/10.5.9/.bottle/etc/my.cnf
맥 인텔 계열일 경우 위와 같은 경로로 찾을 수 있고,
m1인 경우는
/opt/homebrew/etc/my.cnf
/opt/homebrew/Cellar/mysql/8.0.27_1/.bottle/etc/my.cnf
으로 찾을 수 있다.
그리고 my.cnf에 아래와 같이 바꿔주고,
➜ /etc cd /opt/homebrew/etc
➜ etc git:(stable) cat my.cnf
# Default Homebrew MySQL server config
[mysqld]
# Only allow connections from localhost
bind-address = 127.0.0.1
mysqlx-bind-address = 127.0.0.1
sort_buffer_size=8M
다시 서비스를 시작해준당.
➜ ~ brew services restart mysql
Stopping `mysql`... (might take a while)
==> Successfully stopped `mysql` (label: homebrew.mxcl.mysql)
==> Successfully started `mysql` (label: homebrew.mxcl.mysql)
바꼈는지 확인은 mysql 들어가서 다음과 같이 하면 확인 할 수 있다.
mysql> show variables like'%sort_buffer_size%';
+-------------------------+---------+
| Variable_name | Value |
+-------------------------+---------+
| innodb_sort_buffer_size | 1048576 |
| myisam_sort_buffer_size | 8388608 |
| sort_buffer_size | 8388608 |
+-------------------------+---------+
3 rows in set (0.01 sec)
mysql>
그리고 다시 해보면 오류 없이 잘 작동하는 것을 볼 수 있당.
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 배열을_이쁘게
- PhpStorm
- fmf
- UTF8
- 프로그래밍은디버거부터시작이다
- 엘라스틱서치한글성공!
- 더미데이터도유형이있어요
- twoseven.kr/0410
- xml로도
- twoserven.kr/0410
- Testing
- gcp
- 테스팅
- 테스팅환경
- JSON으로도
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
글 보관함