[Linux] MariaDB 테이블 대소문자 구분 설정

동민·2022년 9월 12일
0
post-thumbnail

얼마 전에 MariaDB 테이블 대소문자 설정 방법을 포스팅했었는데,

리눅스에서 MariaDB를 사용하면서 똑같은 현상이 있어서 리눅스용으로 따로 정리하려고 한다.

리눅스에 접속한 상태에서 따라 하시면 됩니다!
로컬 pc의 설정 파일과 헷갈리지 마세요!


1. MariaDB 설정 파일 열기

vim /etc/my.cnf

2. 설정 파일에 대소문자 설정 추가

# 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]
lower_case_table_names = 1

3. 설정 파일 저장 후 MariaDB 재시동

# MariaDB 재실행
sudo systemctl restart mariadb

4. lower_case_table_names 설정 확인

# lower_case_table_names value가 1로 나오면 끝!
SHOW VARIABLES LIKE 'lower%';
profile
Backend engineer

0개의 댓글