본문 바로가기
728x90

전체 글364

복제 Replication Slave IO Thread- 마스터 DBMS에 로그인해서 바이너리로그를 읽어 릴레이로그에 쓰는 쓰레드 Slave SQL Thread- 릴레이로그에서 실제 슬레이브 DBMS에 반영하는 쓰레드 docker run -d -e MYSQL_ROOT_PASSWORD=sample --name=master mariadb:10.1docker run -d -e MYSQL_ROOT_PASSWORD=sample --name slave mariadb:10.1 docker inspect master | grep "IPAddress"docker inspect slave | grep "IPAddress" docker exec -it master bash cd /etc/mysql my.cnf/my.ini master[mysqld]p.. 2018. 12. 19.
show processlist 에 where 조건 사용하기 SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST where time > 10 and info is not null; how to customize `show processlist` in mysql? 2009.05.30http://stackoverflow.com/questions/929612/how-to-customize-show-processlist-in-mysql Chapter 23 The INFORMATION_SCHEMA PROCESSLIST Tablehttps://dev.mysql.com/doc/mysql-infoschema-excerpt/5.1/en/processlist-table.html 2018. 12. 19.
샤딩 sharding 데이터베이스 샤딩 sharding - 파티셔닝과 달리 별도의 샤드를 구축, 샤딩 플랫폼(스파이더)를 통해 구현- 쓰기 성능이 지속적으로 향상됨- Spider 기반 샤딩 구축 수직(Verical) 샤딩- 샤드를 만들어 저장할 때 구분 기준을 연령/성별과 같은 기준으로 나눠 구성- 테이블 단위로 분할 수평(Horizontal) 샤딩- 동일한 시스템을 지역/국가별로 나눠서 구성하는 경우- 동일한 테이블을 여러 개로 분할 범위(range) a-m /n-r / s-z해시(hash) 해시함수 파티션별로 크기를 비슷하게 나눔리스트(list) 특정한 컬럼을 기준컴포지트(composite) range-hash/range-list mariadb 다운로드docker pull mariadb:10.1 스파이더 인스턴스 실행do.. 2018. 12. 19.
트랜잭션 Transcation, 락 Lock, 격리수준 IsolationLevel -- Transcation select @@autocommit; set autocommit = false; create database sampleDB; create table BusinessCard(Name varchar(255), Address varchar(255), Telephone varchar(255)); insert into BusinessCard values ('Bob', 'Seocho-dong 123', '123-4567'); commit; rollback; -- Lock select engine, support from information_schema.engines where support='DEFAULT'; set default_storage_engine = InnoDb;set de.. 2018. 12. 18.
파티셔닝 Partitioning create table BusinessCard(id int not null, name varchar(255), address varchar(255), telephone varchar(255), createtime date) partition by range(year(createtime))( partition p0 values less than (2013), partition p1 values less than (2014), partition p2 values less than (2015), partition p3 values less than MAXVALUE); show create table BusinessCard\G insert into BusinessCard values (1, 'kim','seou.. 2018. 12. 17.
mysql dbdriver call store procedure in codeigniter(ci) mysql dbdriver call store procedure in codeigniter(ci) $sql = "CALL .sp(@out1);"; $this->db->query($sql); $query = $this->db->query("SELECT @out1"); $result_temp = array(); if($query->num_rows() > 0) $result_temp = $query->result_array(); CREATE DEFINER=`id`@`ip` PROCEDURE `sp`( OUT `last_id` INT ) BEGIN SET last_id = "test"; END$$ DELIMITER ; /** * "Count All Results" query * * Generates a plat.. 2018. 12. 17.
Golang : Set up source IP address before making HTTP request [출처] https://www.socketloop.com/tutorials/golang-set-up-source-ip-address-before-making-http-request Problem :There are times that you want to use certain IP address in a machine ( such as the one with permission to connect outside a firewall ) before making a HTTP request to another server. This is similar to the wget binding command :For example : wget --bind-address=192.168.10.1 \How to do th.. 2017. 8. 29.
CURL ERROR 7 Failed to connect to Permission denied “CURL ERROR 7 Failed to connect to Permission denied” error is caused, when for any reason curl request is blocked by some firewall or similar thing.you will face this issue when ever the curl request is not with standard ports.for example if you do curl to some URL which is on port 1234, you will face this issue where as URL with port 80 will give you results easily.Most commonly this error has.. 2017. 7. 25.
커멘드 창에서 링크 만들기 1. 파일 심볼 링크 : mklink "링크" "원본"2. 파일 하드 링크 : mklink /h "링크" "원본"3. 폴더 심볼 링크 : mklink /d "링크" "원본"4. 폴더 정션 링크 : mklink /j "링크" "원본" http://cappleblog.co.kr/539 2016. 12. 20.
728x90