본문 바로가기

컴퓨터/노트북/인터넷

IT 컴퓨터 기기를 좋아하는 사람들의 모임방

조회 수 113 추천 수 0 댓글 0

단축키

Prev이전 문서

Next다음 문서

수정 삭제

단축키

Prev이전 문서

Next다음 문서

수정 삭제
Extra Form
마리아DB셋팅방법
리눅스 설치 후 버전이 계속 달라지면서 기본세팅값이 바뀐다.
아래 내용중에 필요한것만 찾아서 바꿔주면된다.
보통 검은색으로 BOLD처리한 내용위주로 바꿔주면된다.
최신내용의 conf에 없는 설정은 굳이 찾아서 넣어주지 않아도 잘 작동한다.
 
설정파일 위치: etc/mysql/mariadb.conf.d/50-server.cnf
 
# MariaDB database server configuration file.
#
# You can copy this file to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
# 
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
 
# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
 
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
 
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
 
[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc_messages_dir = /usr/share/mysql
lc_messages = en_US
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
#
# * Fine Tuning
# Connection Config 
key_buffer = 128M
max_allowed_packet = 16M
table_open_cache = 1024
max_connections = 2048
max_connect_errors = 20000
sort_buffer_size = 2M
read_buffer_size = 2M
myisam_sort_buffer_size = 2M
thread_cache = 512
query_cache_size = 512M
query_cache_type = 1
thread_concurrency = 16
tmp_table_size = 128M
max_heap_table_size = 128M
skip-name-resolve
character-set-server=utf8
default-storage-engine=InnoDB
 
log_warnings = 2
#
# Enable the slow query log to see queries with especially long duration
slow_query_log          = 1
slow_query_log_file = /var/log/mysql/mariadb-slow.log
long_query_time         = 5
#log_slow_rate_limit = 1000
log_slow_verbosity = query_plan
 
#log-queries-not-using-indexes
#log_slow_admin_statements
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id = 1
#report_host = master1
#auto_increment_increment = 2
#auto_increment_offset = 1
log_bin = /var/log/mysql/mariadb-bin
log_bin_index = /var/log/mysql/mariadb-bin.index
# not fab for performance, but safer
#sync_binlog = 1
expire_logs_days = 1
max_binlog_size         = 100M
# slaves
#relay_log = /var/log/mysql/relay-bin
#relay_log_index = /var/log/mysql/relay-bin.index
#relay_log_info_file = /var/log/mysql/relay-bin.info
#log_slave_updates
#read_only
#
# If applications support it, this stricter sql_mode prevents some
# mistakes like inserting invalid dates etc.
#sql_mode = NO_ENGINE_SUBSTITUTION,TRADITIONAL
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
# you can't just change log file size, requires special procedure
#innodb_log_file_size = 50M
innodb_buffer_pool_size= 32G (메모리 총 용량의 70~80%를 넣는다. 이게 가장중요하다..)
innodb_additional_mem_pool_size=40M
innodb_write_io_threads = 16 (CPU코어 갯수)
innodb_read_io_threads = 16 (CPU코어 갯수)
innodb_thread_concurrency = 32 
innodb_flush_log_at_trx_commit = 1
innodb_log_file_size = 256M
innodb_log_buffer_size = 32M
innodb_log_files_in_group = 2
innodb_flush_method=O_DIRECT (새로고침)
innodb_lock_wait_timeout = 120 (짧게 줄이면 좋을것같다..이노디비의 특성상)
innodb_io_capacity = 3000 (SSD는 10000~20000정도가 적당할것 같다. HDD는 1000~5000)
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
 
#
# * Galera-related settings
#
[galera]
# Mandatory settings
#wsrep_on=ON
#wsrep_provider=
#wsrep_cluster_address=
#binlog_format=row
#default_storage_engine=InnoDB
#innodb_autoinc_lock_mode=2
#
# Allow server to accept connections on all interfaces.
#
#bind-address=0.0.0.0
#
# Optional setting
#wsrep_slave_threads=1
#innodb_flush_log_at_trx_commit=0
 
[mysqldump]
quick
quote-names
max_allowed_packet = 128M
 
[mysql]
#no-auto-rehash # faster start of mysql but no tab completion
 
[isamchk]
key_buffer = 16M
 
#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/

 


컴퓨터/노트북/인터넷

IT 컴퓨터 기기를 좋아하는 사람들의 모임방

List of Articles
번호 분류 제목 조회 수 날짜
공지 뉴스 구글 최신 뉴스 file 1384 2024.12.12
공지 사랑LOVE 포인트 만렙! 도전 4606 2025.03.19
공지 🚨(뉴비필독) 전체공지 & 포인트안내 2 25843 2024.11.04
공지 URL만 붙여넣으면 끝! 임베드 기능 20425 2025.01.21
10639 일반 "갤럭시S6엣지 플러스, 3000mAh 대용량 배터리 탑재"… 왜? 1082 2015.07.20
10638 정보 # TAKIS 서버용 my.cnf... 830 2023.11.06
10637 ' 크래시 밴디쿳 4: 이츠 어바웃 타임', PS5, Xbox Series X, Switch판의 발매가 3월 12일로 결정. PC판은 금년 후반을 예정. 51 2021.02.11
10636 일반 ' 크래시 밴디쿳 4: 이츠 어바웃 타임', PS5, Xbox Series X, Switch판의 발매가 3월 12일로 결정. PC판은 금년 후반을 예정. 497 2023.03.27
10635 일반 '10배 빠른' 5G 지하철 와이파이…다음달부터 중단 1245 2023.11.24
10634 정보 '11시간 쓸 수 있다' 광고한 300만 원대 맥북 배터리 5시간이면 '아웃'...6개월째 수리도 못받아 - 소비자가 만드는 신문 786 2021.02.21
10633 정보 '5G 아이폰12'는 4종으로…애플, 제품군 다변화 나섰다 - 한겨레 749 2021.02.21
10632 일반 'LG G8 씽큐' 배터리 수명 늘어날까…3400~3500mAh 배터리 탑재 전망 191 2019.02.08
10631 일반 'LG G8 씽큐' 배터리 수명 늘어날까…3400~3500mAh 배터리 탑재 전망 1784 2023.03.27
10630 정보 'LG 롤러블폰 개발 중단 우려' 中BOE, 아이폰13 물량 공략 - 이데일리 694 2021.02.24
10629 정보 'M1 맥북 에어 vs. M1 맥북 프로' 어떤 제품을 어떤 구성으로 구매해야 할까 - ITWorld Korea 735 2021.03.06
10628 정보 'M자 탈모' 사라지는 아이폰… "갤럭시 닮아간다" - 머니S - Money S 747 2021.03.06
10627 정보 '美-中 대립' 최고조에도...中서 애플 아이폰만 유일한 성장 - 뉴데일리경제 771 2021.02.21
10626 정보 '갤럭시 vs 아이폰' 12만 LG 임직원 선택은 - IT조선 777 2021.02.21
10625 정보 '갤럭시S21 울트라' 국내모델 엑시노스2100·12GB램 탑재 69 2020.12.26
10624 정보 '국대폰' 갤럭시S21 및 아이폰12 미니 포함한 기존 기종 프로모션 진행 - 잡포스트 763 2021.02.21
10623 정보 '국대폰' 아이폰12 미니· 갤럭시S21 특가 판매 및 무료 나눔 이벤트 진행 - 에너지경제신문 751 2021.02.24
10622 정보 '국대폰' 최신 스마트폰 갤럭시S21 및 아이폰12 미니 특가 판매 프로모션 진행 - ITBizNews 775 2021.02.22
10621 정보 '국대폰', 갤럭시S21·아이폰12 특가 판매 진행 - 이투뉴스 768 2021.03.06
10620 정보 '극딜나라' 갤럭시S20, 아이폰12 PRO 35만원 이상 할인 - 아이티비즈 767 2021.03.01
10619 일반 '눈에 띄게 얇아진' Apple Watch Series 10, 결국 수면 무호흡증 감지 기능 탑재 file 137 2024.09.06
10618 일반 '모토로라폰’ LG헬로비전 통해 재상륙 544 2022.12.31
10617 일반 '모토로라폰’ LG헬로비전 통해 재상륙 1795 2023.03.27
10616 '미르4' 희귀 강화석 어디서 얻어요? 86 2021.02.03
10615 일반 '미르4' 희귀 강화석 어디서 얻어요? 404 2023.03.27
10614 정보 '배신자 삼성 무너뜨리는게 목표'…혐한에 빠진 세계 최대 제조대행 [뉴스人사이드] - 아시아경제 782 2021.03.01
10613 정보 '비트코인 인기 상당하네'...업비트, 구글·애플 앱마켓 1위 석권 734 2021.02.22
10612 정보 '빨간색이 주황색으로'…아이폰12서 '색빠짐 현상' 나타나 - 이데일리 783 2021.03.17
10611 정보 '빵집폰' 갤럭시노트10 및 갤럭시S10 5G, LG V50s ThinQ 재고정리 - 아이티비즈 718 2021.03.06
10610 일반 '신학기 시즌 시작'…유통업계 할인 大戰 - 아시아경제 53 2023.03.27
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 355 Next
/ 355