# DataBase/Mysql(MariaDB)2015. 8. 16. 06:11mysql db 다중 테이블 조인

1. 먼저 두개의 테이블을 조인 select 과목.이름, 과목.교수번호, 교수.이름, 교수.학과번호 from 과목, 교수 where 과목.교수번호 = 교수.번호 2. 조인된 테이블에 다른 테이블을 추가. 이때 외래키를 조건절에서 잘 조인해줘야한다. select 과목.이름, 과목.교수번호, 교수.이름, 교수.학과번호, 학과.번호, 학과.이름 from 과목,교수,학과 where 과목.교수번호 = 교수.번호 and 교수.학과번호 = 학과.번호 3.필요속성만 출력 select 과목.이름, --과목.교수번호, 교수.이름, --교수.학과번호, --학과.번호, 학과.이름 from 과목.교수번호 = 교수.번호 and 교수.학과번호 = 학과.번호 항상 생각해야 할 것은 두개의 테이블에서 존재하는 공통속성이다. 즉 수퍼키..

mysql replication 설정
# DataBase/Mysql(MariaDB)2015. 8. 16. 06:10mysql replication 설정

❑ MySQL Replication 설정 1. 환경설정(MasterServer) # vi /etc/my.cnf [mysqld] #log setting log-bin = mysql-bin // 로그파일명 max_binlog_size = 100M // 로그파일크기 expire_logs_days = 7 // 로그보존주기 #Replication for master server server-id = 3 // 서버 식별자(유니크) binlog_do_db = test1 // 리플리케이션DB명(생략시엔 전체DB를 리플리케이션함) binlog_do_db = test2 // 여러 개의 DB일경우, 계속 추가 2. mysql 재가동(MasterServer) # mysqladmin -u root -p shutdown # my..

[error]cmake 설치시 could not find curses문제
# DataBase/Mysql(MariaDB)2015. 8. 16. 06:09[error]cmake 설치시 could not find curses문제

에러내용 -- Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH) CMake Error at cmake/readline.cmake:85 (MESSAGE): Curses library not found. Please install appropriate package, remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel. Call Stack (most recent call first): cmake/readline.cmake:128 (FIND_CURSES) ..

FATAL ERROR: Could not find ./bin/my_print_defaults'
# DataBase/Mysql(MariaDB)2015. 8. 16. 06:08FATAL ERROR: Could not find ./bin/my_print_defaults'

'FATAL ERROR: Could not find ./bin/my_print_defaults' my_print_defaults 있는 곳으로 basedir 를 지정 [darksharavim]./mysql_install_db \ --basedir=/usr/local/mysql \ --user=mysql \ --datadir=/usr/local/mysql/data

# DataBase/DB22015. 8. 16. 06:08시스템정보

#################### [DB2]시스템정보보기 (테이블/칼럼정보등) #################### list tables for schema CCS - - SELECT TABNAME,INDNAME,COLNAMES ,UNIQUERULE,INDEXTYPE FROM SYSCAT.INDEXES WHERE TABSCHEMA='CCS' ; -- DESCRIBE TABLE 테이블이름 ===== 참조카달로그뷰=== 참고로 DB2에 있는 시스템 카탈로그 뷰 입니다. ========================================= SYSCAT.CHECKS 점검제한조건 SYSCAT.COLUMNS 컬럼 SYSCAT.COLCHECKS 점검 제한 조건이 참조하는 컬럼 SYSCAT.KEYCOLUSE ..

image