dnf install mariadb-server
dnf module install mariadb:10.11/server
systemctl start mariadb.service
systemctl enable mariadb.service
=========================설치후 login 함
mysql -u root -p
=사용자 계정 추가 ==================
grant all on test_1.* to user1@localhost identified by 'user1234';
====================================song user 생성
grant all on test_1.* to song@localhost identified by 'song1234';
show grants for song@localhost;
참고 set password for user1@localhost = password('user4321');
=============database 생성 ====================
create database or schema [db명] default character set utf8;
create database song character set utf8;
show variables like 'char%';
===================3306 port 를 사용 하므로 방화벽 허용
sudo firewall-cmd --query-port=3306/tcp
sudo firewall-cmd --add-port=3306/tcp --permanent
sudo firewall-cmd --reload
==========================================================
=============client 접속 권한부여.. ==============================
GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.52.%' IDENTIFIED BY 'song1234';
GRANT ALL PRIVILEGES ON *.* TO 'song'@'192.168.52.%' IDENTIFIED BY 'song1234';
=============================================================
8기가 | innodb_additional_mem_pool_size = 8M innodb_buffer_pool_size = 5G innodb_buffer_pool_instances = 4 innodb_flush_log_at_trx_commit = 1 innodb_flush_method=O_DIRECT innodb_log_files_in_group = 2 innodb_log_file_size = 256M innodb_log_buffer_size = 8M innodb_lock_wait_timeout = 50 innodb_thread_concurrency = 8 innodb_write_io_threads = 4 innodb_read_io_threads = 4 innodb_io_capacity = 200 |
16기가 | innodb_additional_mem_pool_size = 8M innodb_buffer_pool_size = 12G innodb_buffer_pool_instances = 8 innodb_flush_log_at_trx_commit = 1 innodb_flush_method=O_DIRECT innodb_log_files_in_group = 2 innodb_log_file_size = 256M innodb_log_buffer_size = 8M innodb_lock_wait_timeout = 50 innodb_thread_concurrency = 12 innodb_write_io_threads = 8 innodb_read_io_threads = 8 innodb_io_capacity = 200 |
32기가 | innodb_additional_mem_pool_size = 8M innodb_buffer_pool_size = 24G innodb_buffer_pool_instances = 16 innodb_flush_log_at_trx_commit = 1 innodb_flush_method=O_DIRECT innodb_log_files_in_group = 2 innodb_log_file_size = 256M innodb_log_buffer_size = 8M innodb_lock_wait_timeout = 50 innodb_thread_concurrency = 16 innodb_write_io_threads = 8 innodb_read_io_threads = 8 innodb_io_capacity = 200 |
show variables like 'wait_timeout';
cd /etc/my.cnf.d
ps -el | grep mysql
mysql -u root -p
SHOW FULL PROCESSLIST;
SELECT *
FROM information_schema.processlist
ORDER BY id;
cd /etc/my.cnf.d
vi mariadb-server.cnf <== 메모리 수정을 위해 아래내용추가.
===== 메모리 설정
innodb_additional_mem_pool_size = 8M
innodb_buffer_pool_size = 5G
innodb_buffer_pool_instances = 4
innodb_flush_log_at_trx_commit = 1
innodb_flush_method=O_DIRECT
innodb_log_files_in_group = 2
innodb_log_file_size = 256M
innodb_log_buffer_size = 8M
innodb_lock_wait_timeout = 50
innodb_thread_concurrency = 8
innodb_write_io_threads = 4
innodb_read_io_threads = 4
innodb_io_capacity = 200
=============================================