- SuiteCRM: MARIADB 환경 구성
- 기본 환경 구성
- Database 생성
- Backup/Restore
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 생성
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
최종 수정일: 2024-09-30 12:26:19
이전글 :
다음글 :