[SuiteCRM] [설치가이드] MariaDB 환경 구성

MariaDB 5.5.57의 환경을 구성 합니다.
기본 환경 구성
vi  /etc/my.cnf

[mysqld]
#— UTF-8 Charset Setting
init_connect=”SET collation_connection=utf8_general_ci”
init_connect=”SET NAMES utf8″
character-set-server=utf8
collation-server=utf8_general_ci
skip-character-set-client-handshake

#— InnoDB Setting
default-storage-engine=InnoDB

#—    Setting : Default
key_buffer_size = 256M
query_cache_size = 512M
tmp_table_size = 64M
innodb_buffer_pool_size = 128M
innodb_additional_mem_pool_size = 1M
innodb_log_buffer_size = 1M
max_connections = 200

sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
join_buffer_size = 1M
thread_stack = 196K
binlog_cache_size = 32K

wait_timeout = 30
interactive_timeout = 30
max_heap_table_size = 64M
table_cache = 1024
max_allowed_packet = 4M
myisam_sort_buffer_size = 64M
thread_cache = 8
thread_stack = 262144
max_connect_errors = 1024
query_cache_type = 1
query_cache_limit = 16M

vi  /etc/my.cnf.d/client.cnf
#— UTF-8 Charset Setting
[client] default-character-set=utf8

[client-mariadb] default-character-set=utf8

vi  /etc/my.cnf.d/mysql-clients.cnf

#— UTF-8 Charset Setting
[mysql] default-character-set=utf8

[mysqldump] default-character-set=utf8

 

#— 방화벽 설정
firewall-cmd  –permanent  –add-service=mysql
firewall-cmd  –reload
firewall-cmd  –list-all

Database 생성

create  database  ${DATABASE};
show databases;

grant all privileges on ${DATABASE}.* to ${USER}@localhost identified by ‘${PASSWORD}’;
grant all privileges on ${DATABASE}.* to ${USER}@’%’ identified by ‘${PASSWORD}’;
flush privileges;

select Host, User, Password from user;
select Host, Db, User from db;

Backup/Restore

#— Backup
TIMESTAMP=`date +%Y%m%d_%H%M%S`
mysqldump -u${USER} -p${PASSWORD} ${DATABASE} > /work/backup/${DATABASE}_db_${TIMESTAMP}.sql

#— Restore
mysql -u${USER} -p${PASSWORD} -D ${DATABASE} < /work/backup/${DATABASE}_${TIMESTAMP}.sql

2017.11.15 ~ 2017.11.16, ver 0.02
0 답글

댓글을 남겨주세요

토론에 참여하고 싶으세요?
마음껏 기여하세요!

댓글 남기기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다