블로그 이미지
bedbmsguru

Notice

Recent Post

Recent Comment

Recent Trackback

Archive

calendar

1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
  • total
  • today
  • yesterday
2018. 12. 12. 14:16 maridb&mysql

Mariadb 를 10.2.18  --> 10.2.19로 업그레이드를 하고 나니 xtrabackup을 이용한  백업이 


unsupported redo log format. the redo log was created 


라는 에러가 나면서 백업이 되지 않는다 해서 찾아낸게 mariabackup  명령어만 다르고 옵션이나 


사용법은 동일하다.


1. xtrabackup을 사용해서백업 복구

(1) 백업

mariabackup --backup --user=root --password='암호' --target-dir=/usr/dat/zabbix_backup

mariabackup --prepare  --target-dir=/usr/dat/zabbix_backup


(2)복구

rsync -avrP /root/aaa/ /var/lib/mysql/




--SELinux 등록

chcon -Rt mysqld_db_t /var/lib/mysql

chcon -Ru system_u /var/lib/mysql

chown -R mysql:mysql /var/lib/mysql


--권한 등록

sudo chown -cR mysql:mysql /var/lib/mysql/*

sudo chown mysql:mysql /var/lib/mysql


--mariadb 10.2 version에서 old redo log를 이용한 crash recovery 시도를 막기 위해아래 파일들을 지워준다.

rm /var/lib/mysql/ib_logfile*


--시작

sudo systemctl start mariadb



출처: https://mariadb.com/kb/en/library/full-backup-and-restore-with-mariabackup/

'maridb&mysql' 카테고리의 다른 글

mysql root 패스워드 분실 대처방법  (0) 2020.07.30
mysql status 확인하기  (0) 2020.07.30
mariadb 계정, 권한 관련  (0) 2018.10.27
mysql DB관리용 쿼리  (0) 2018.10.26
procedure 생성 템플릿  (0) 2018.10.26
posted by bedbmsguru
2018. 11. 30. 11:44 Zabbix

참조: https://github.com/grundic/zabbix-disk-performance



1. wget https://raw.githubusercontent.com/grundic/zabbix-disk-performance/master/userparameter_diskstats.conf -O /etc/zabbix/zabbix_agentd.d/userparameter_diskstats.conf


2. wget https://raw.githubusercontent.com/grundic/zabbix-disk-performance/master/lld-disks.py -O /usr/local/bin/lld-disks.py



3. chmod 755 /usr/local/bin/lld-disks.py


4. vi /usr/local/bin/lld-disks.py


  -->skippable = {"sr", "loop", "ram"} 에 "dm-" 추가


dm- 와 sdx는 중복이므로 둘중에 하나만 하면 된다. 


5. zabbix-agent 재시작



6. Zabbix Web 으로 로그인해서 Template_Linux_DISK_Performance(이름은 다를 수 있음) 를 적용한다.

'Zabbix' 카테고리의 다른 글

Windows Zabbix Agent 설치  (0) 2019.05.30
Postgresql 모니터링  (0) 2019.02.19
zabbix Agent 설치  (0) 2018.10.26
SAN Switch 모니터링 적용  (0) 2018.10.26
brocade SAN fc port zabbix 모니터링  (0) 2018.10.26
posted by bedbmsguru
2018. 10. 27. 22:50 maridb&mysql


--계정생성
INSERT INTO mysql.user (host,user,password) VALUES('아이피','root',password('신규암호'));
create user '사용자이름'@'localhost' identified by 'xxxxx';

--권한부여
GRANT ALL PRIVILEGES ON *.* TO 'root'@'아이피' WITH GRANT OPTION; #GRANT 권한까지 줄 경우

#PROCEDURE 관련권한
GRANT ALTER ROUTINE, CREATE ROUTINE, EXECUTE ON HWANG_DATA.* TO 'hwang_gw'@'1.1.1.1';

GRANT SELECT ON mysql.proc TO 'monitor_user'@'%';
grant all privileges on MONITOR_RESULT.* to 'monitor_user'@'%';


--권한 시스템 적용
flush privileges;

--패스워드변경
update mysql.user set password=password('암호') where user='';

--백업계정의 권한(pw가 노출되므로 최소한의 권한만 준다.)
GRANT LOCK TABLES, TABLES, RELOAD, REPLICATION, CLIENT, SELECT, SHOW DATABASES, SHOW VIEW ON *.* TO 'backup'


'maridb&mysql' 카테고리의 다른 글

mysql status 확인하기  (0) 2020.07.30
mariabackup 을 이용한 mariadb 백업  (0) 2018.12.12
mysql DB관리용 쿼리  (0) 2018.10.26
procedure 생성 템플릿  (0) 2018.10.26
Function 템플릿  (0) 2018.10.26
posted by bedbmsguru