일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- mysql 사용자 생성
- linux mount 방법
- mysql database 검사
- mysql yum install
- 쿠키 하루 저장
- mysql 모든 데이터 삭제
- mysql database truncate
- mariadb 모든 데이터 삭제
- 서버 재시작시 mount
- mariadb galera cluster
- mysql yum 설치
- mysql DB권한
- mysql 자동복구
- mysql 검사
- mariadb all table truncate
- mysql recovery
- cookie 하루 저장
- 쿠키 하루
- 쿠키 오늘
- mysqlcheck
- galera cluster 재시작
- cookie today
- elasticsearch mapping생성
- mysql all table truncate
- mysql table 손상
- docker 설치
- mysql galera cluster
- mysql auto repair
- mysql 손상
- centos mount
- Today
- Total
목록MYSQL&MARIADB (7)
IT
mysql yum install 설치 # vi /etc/yum.repos.d/MariaDB.repo repo파일 내용 [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.1/centos7-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 install설치 # yum install MariaDB-server 확인 # rpm -qa | grep MariaDB DB 시작 # systemctl start mysql DB 상태 확인 # systemctl status mysql 서버재시작시 DB 자동시작(선택사항) #systemctl enable mysql DB stop 후 # syste..
mairadb,mysql 백업 & 백업 파일로 복원하기 -v 옵션을 넣으면 작업내용이 print됨. --mysql 백업시 # mysqldump -v --routines --triggers -u[UserId] -p [Database Name] > [PATH][백업할 파일명].sql ex) # mysqldump -v --routines --triggers -u[user명] -p test_db > /var/lib/mysql/test_db_dump_20201109.sql ※ --routines --triggers 옵션 넣을시 function, trigger,procedure등이 dump됨. --mysql 복원시 mysql -v -u[UserId] -p [Database Name] < [백업할 파일명].sql e..
mysql mariadb 모든테이블 데이터 삭제 --모든테이블에 대한 TRUNCATE 구문 만들기 SELECT Concat('TRUNCATE TABLE ',table_schema,'.',TABLE_NAME, ';') FROM INFORMATION_SCHEMA.TABLES where table_schema = '[DB명]' 조회시 TRUNCATE TABLE [db명].[테이블명]; ex) TRUNCATE TABLE test_db.test_table; 위와 같은형태로 모든테이블에 대한 TRUNCATE 조회됨. 외래키 제약조건 무시후 데이터 삭제 후 다시 옵션 복구한다. SET FOREIGN_KEY_CHECKS=0; --외래키제약조건 무시 TRUNCATE TABLE test_db.test_table1; TRU..