백업 논리적 백업 (mysqldump를 이용하여 텍스트 형식으로 테이블의 내용을 저장하는 백업) -. mysql 서버에 접속해서 데이터를 복구 하기 위한, create table, insert .. 문을 만들어 내기 때문에 물리적 백업보다 오래걸린다. -. 테이블에 존재하는 index에 대한 정보는 백업 내용에 포함되어 있지 않지만, 덤프파일을 이용해서 데이터를 복구 시에는 인덱스가 생성된다. -. 설정파일이나, 로그파일 등은 백업되지 않는다. -. --opt옵션을 사용하면 덤프과정을 최적화 시키지만, --opt를 사용하는 순간 모든 테이블에 lock을 설정하기 때문에 다른 세션에서 DML이 불가능하다. -. --opt옵션은 기본적으로 extended-insert를 활성화 시켜서, 한 건 한 건 inse..
MYSQL 에서 스키마와 데이터베이스 MYSQL의 경우 사람에따라 스키마를 데이터베이스라고 부르는 지만 같은 의미다. CREATE SCHEMA test DEFAULT CHARACTER SET utf8; CREATE DATABASE test DEFAULT CHARACTER SET utf8; 두 명령어가 동일한 결과를 냅니다. EX> mysql schema(database) , user 관계 1. root와 test_user1계정이 존재 mysql> select host , user , plugin , password_last_changed , password_expired , account_locked from user ; +-----------+------------------+--------------..
계정 및 권한 관리 기본적으로 설치 되는 데이터 베이스인 mysql 데이터베이스에 유저 및 권한 정보가 저장되며, mysql 데이터베이스 user라는 테이블에 사용자 정보가 저장되며, db라는 테이블에 권한 정보가 저장된다. 최초 설치 시에는 비밀번호가 설정되지 않는다. 관리자는 비밀번호를 재설정 해야한다. 설치 시, mysql_install_db 스크립트에는 권한 테이블을 설정 하는 것이다. mysql> use mysql Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> selec..
Directory 확인 mysql> SHOW VARIABLES WHERE Variable_Name LIKE "%dir"; +-----------------------------+----------------------------------+ | Variable_name | Value | +-----------------------------+----------------------------------+ | basedir | /usr/local/mysql/ | | character_sets_dir | /usr/local/mysql/share/charsets/ | | datadir | /data/mysql/ | | innodb_data_home_dir | | | innodb_doublewrite_dir |..
1. 바이너리 다운로드*Linux 상세 버전 확인# grep . /etc/*-release* glib 버전 확인getconf -a | grep libchttps://downloads.mysql.com/archives/community/ MySQL :: Download MySQL Community Server (Archived Versions)Please note that these are old versions. New releases will have recent bug fixes and features! To download the latest release of MySQL Community Server, please visit MySQL Downloads. MySQL open source softw..
1. mysql 유저생성 groupadd mysql useradd -M -g mysql mysql cat /etc/passwd 2. 의존성 설치 - MySQL을 컴파일 하기 위한 라이프러리 설치 yum -y install ncurses-devel yum -y install perl yum -y install perl-Data-Dumper yum -y install cmake yum -y install wget yum -y install gcc-c++ yum install -y cmake bison gcc gcc-c++ ncurses-devel yum install devtoolset-10-gcc devtoolset-10-gcc-c++ devtoolset-10-binutils 3. MySQL 바이너리 준비..