반응형
vi /etc/yum.repo.d/MariaDB.repo
------------------------------------------------------------------------------------------
# MariaDB 10.6 CentOS repository list - created 2022-11-01 08:21 UTC
# https://mariadb.org/download/
[mariadb]
name = MariaDB
baseurl = https://tw1.mirror.blendbyte.net/mariadb/yum/10.6/centos7-amd64
gpgkey=https://tw1.mirror.blendbyte.net/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck=1
------------------------------------------------------------------------------------------
yum makecache
yum install MariaDB-server MariaDB-client
------------------------------------------------------------------------------------------
vim /etc/my.cnf
[client]
port = 3306
socket = /var/lib/mysql/mysql.sock
[mysqld]
port = 3306
innodb_data_home_dir = /var/lib/mysql
socket = /var/lib/mysql/mysql.sock
default-storage-engine=INNODB
skip-external-locking
skip-name-resolve
skip-host-cache
wait_timeout = 600
interactive_timeout = 1200
max_connections = 1024
max_connect_errors=999999999
slow-query-log=1
long_query_time=1
slow_query_log_file=/var/lib/mysql/log-slow-queries.log
max_allowed_packet = 128M
innodb_buffer_pool_size = 1G
innodb_log_buffer_size = 16M
innodb_lock_wait_timeout = 160
innodb_file_per_table=1
innodb_log_file_size = 512M
innodb_log_files_in_group=4
innodb_max_dirty_pages_pct = 30
innodb_flush_method = O_DIRECT
innodb_lock_wait_timeout = 120
innodb_doublewrite = ON
# parameter edit
query_cache_limit=128M
query_cache_size=64M
query_cache_type=1
thread_concurrency = 8
skip-external-locking
init_connect=SET collation_connection=utf8_unicode_ci
init_connect=SET NAMES 'utf8'
character-set-server=utf8
collation-server=utf8_unicode_ci
log-bin=mysql-bin
sync_binlog = 1
binlog_cache_size=5M
max_binlog_size=250M
binlog_format=mixed
expire_logs_days=7
server-id=1
[mysqldump]
quick
max_allowed_packet = 16M
default-character-set=utf8
[mysql]
no-auto-rehash
default-character-set=utf8
[myisamchk]
key_buffer_size = 128M
sort_buffer_size = 128M
read_buffer = 2M
[mysqlhotcopy]
interactive-timeout
------------------------------------------------------------------------------------------
systemctl start mariadb
systemctl status mariadb
systemctl enable mariadb
/usr/bin/mysqladmin -u root password '패스워드 설정'
반응형
'공부 > 리눅스 서버' 카테고리의 다른 글
[linux] MariaDB 삭제 및 재설치 (0) | 2023.03.20 |
---|---|
[oracle] ORA-31633 expdp error (0) | 2023.03.15 |
[linux] rsync: mkstemp...rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) (0) | 2022.11.15 |
[linux] 업데이트(update) Centos7.4 to 7.9 (0) | 2022.09.20 |
[linux] exfat 마운트 방법 (0) | 2022.06.21 |
댓글