MySQL-Ch10

Similar documents
8 장데이터베이스 8.1 기본개념 - 데이터베이스 : 데이터를조직적으로구조화한집합 (cf. 엑셀파일 ) - 테이블 : 데이터의기록형식 (cf. 엑셀시트의첫줄 ) - 필드 : 같은종류의데이터 (cf. 엑셀시트의각칸 ) - 레코드 : 데이터내용 (cf. 엑셀시트의한줄 )

Microsoft PowerPoint - 10Àå.ppt

본문서는 초급자들을 대상으로 최대한 쉽게 작성하였습니다. 본문서에서는 설치방법만 기술했으며 자세한 설정방법은 검색을 통하시기 바랍니다. 1. 설치개요 워드프레스는 블로그 형태의 홈페이지를 빠르게 만들수 있게 해 주는 프로그램입니다. 다양한 기능을 하는 플러그인과 디자인

MySQL-Ch05

01_피부과Part-01

ORANGE FOR ORACLE V4.0 INSTALLATION GUIDE (Online Upgrade) ORANGE CONFIGURATION ADMIN O

윈도우시스템프로그래밍

1217 WebTrafMon II

10.ppt

make life game.doc

Copyright 2004 Sun Microsystems, Inc Network Circle, Santa Clara, CA U.S.A..,,. Sun. Sun. Berkeley BSD. UNIX X/Open Company, Ltd.. Sun, Su

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D D382E687770>

윈도우시스템프로그래밍

Sena Device Server Serial/IP TM Version

13주-14주proc.PDF

untitled

1. efolder 시스템구성 A. DB B. apache - mod-perl - PHP C. SphinxSearch ( 검색서비스 ) D. File Storage 2. efolder 설치순서 A. DB (MySQL) B. efolder Service - efolder

Sena Technologies, Inc. HelloDevice Super 1.1.0

LXR 설치 및 사용법.doc

목차 BUG offline replicator 에서유효하지않은로그를읽을경우비정상종료할수있다... 3 BUG 각 partition 이서로다른 tablespace 를가지고, column type 이 CLOB 이며, 해당 table 을 truncate

소개 TeraStation 을 구입해 주셔서 감사합니다! 이 사용 설명서는 TeraStation 구성 정보를 제공합니다. 제품은 계속 업데이트되므로, 이 설명서의 이미지 및 텍스트는 사용자가 보유 중인 TeraStation 에 표시 된 이미지 및 텍스트와 약간 다를 수

05Àå

MySQ4e-01

단계

침입방지솔루션도입검토보고서

@OneToOne(cascade = = "addr_id") private Addr addr; public Emp(String ename, Addr addr) { this.ename = ename; this.a

Simplify your Job Automatic Storage Management DB TSC

PowerPoint 프레젠테이션

MySQL-.. 1

Chap7.PDF

Sun Java System Messaging Server 63 64

DBMS & SQL Server Installation Database Laboratory


PRO1_09E [읽기 전용]

uFOCS

APOGEE Insight_KR_Base_3P11

6주차.key

Table of contents 1. 구성도 Maxgauge For MySQL 설치정보... 6 설치파일정보... 6 포트정보... 6 주요디렉토리... 6 소프트웨어기동 / 종료... 7 기동... 7 종료 Maxgauge For MySQ

PowerPoint 프레젠테이션

untitled

untitled

Remote UI Guide

untitled

목차 1. 시작하며 MySQL storage engines 복구유틸...3 1) Mysqlcheck...3 2) myisamchk MyISAM...6 1) 테이블생성...6 2).frm 복구...7 3).MYI 복구 ).

NoSQL

Microsoft Word - cents_yum 으로 APM_zend_optimizer_정현호_.doc

FileMaker 15 ODBC 및 JDBC 설명서

Connection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET

Tablespace On-Offline 테이블스페이스 온라인/오프라인

最即時的Sybase ASE Server資料庫診斷工具

28 THE ASIAN JOURNAL OF TEX [2] ko.tex [5]

vm-웨어-01장

목차 1. 제품 소개 특징 개요 Function table 기능 소개 Copy Compare Copy & Compare Erase

TITLE

Solaris Express Developer Edition

목 차

untitled

목차 BUG 문법에맞지않는질의문수행시, 에러메시지에질의문의일부만보여주는문제를수정합니다... 3 BUG ROUND, TRUNC 함수에서 DATE 포맷 IW 를추가지원합니다... 5 BUG ROLLUP/CUBE 절을포함하는질의는 SUBQUE

3 S Q L A n t i p a t t e r n s Trees/intro/parent.sql CREATE TABLE Comments ( comment_id SERIAL PRIMARY KEY, parent_id BIGINT UNSIGNED, comment TEXT

Relational Model

Contents I. 칼라스 네트워크 플레이어란 1. Pc-Fi를 넘어서 발전한 차세대 음악 플레이어 칼라스 네트워크 플레이어의 장점 3. 시스템 기본 구성

PCServerMgmt7

FileMaker ODBC 및 JDBC 가이드

PowerPoint 프레젠테이션

Oracle Database 10g: Self-Managing Database DB TSC

관광스토리텔링2_내지

Assign an IP Address and Access the Video Stream - Installation Guide

untitled

62

Lec. 2: MySQL and RMySQL

Spring Boot/JDBC JdbcTemplate/CRUD 예제

구축환경 OS : Windows 7 그외 OS 의경우교재 p26-40 참조 Windows 의다른버전은조금다르게나타날수있음 Browser : Google Chrome 다른브라우저를사용해도별차이없으나추후수업의모든과정은크롬사용 한

¾Ë·¹¸£±âÁöħ¼�1-ÃÖÁ¾

01....b

2007백서-001-특집

00목차

(291)본문7

SQL Developer Connect to TimesTen 유니원아이앤씨 DB 기술지원팀 2010 년 07 월 28 일 문서정보 프로젝트명 SQL Developer Connect to TimesTen 서브시스템명 버전 1.0 문서명 작성일 작성자

슬라이드 1

Mango220 Android How to compile and Transfer image to Target

I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r

Chapter 1

CLX8380_KR.book

PowerPoint 프레젠테이션

User Guide

Ç¥Áö

105È£4fš

강의 개요

Copyright 2012, Oracle and/or its affiliates. All rights reserved.,.,,,,,,,,,,,,.,...,. U.S. GOVERNMENT END USERS. Oracle programs, including any oper

Microsoft Word - enterprise-linux-2-9.doc

untitled

Mars OS System Administration Guide

cam_IG.book

결과보고서

Orcad Capture 9.x

ODS-FM1

chapter1,2.doc

01Àå

1. What is AX1 AX1 Program은 WIZnet 사의 Hardwired TCP/IP Chip인 iinchip 들의성능평가및 Test를위해제작된 Windows 기반의 PC Program이다. AX1은 Internet을통해 iinchip Evaluation

thesis

Transcription:

10 Chapter.,,.,, MySQL. MySQL mysqld MySQL.,. MySQL. MySQL....,.,..,,.,. UNIX, MySQL. mysqladm mysqlgrp. MySQL 608 MySQL(2/e)

Chapter 10 MySQL. 10.1 (,, ). UNIX MySQL, /usr/local/mysql/var, /usr/local/mysql/data, RPM /var/lib/mysql. Windows c:\mysql\data. datadir=dir_name..... MySQL ( : mysqld,. ). ( : ),. ( ),..,. datadir, mysqladmin variables SHOW VARIABLES. ( : ) mysqladmin. UNIX. % mysqladmin variables +---------------+-----------------------+ Variable_name Value +---------------+-----------------------+... datadir /usr/local/mysql/var/... MySQL(2/e) 609

PART 3 Windows. C:\> mysqladmin variables +---------------+-----------------------+ Variable_name Value +---------------+-----------------------+... datadir c:\mysql\data\... mysql. mysql> SHOW VARIABLES LIKE 'datadir'; +---------------+-----------------------+ Variable_nam Value +---------------+-----------------------+ datadir /usr/local/mysql/var/ +---------------+-----------------------+, TCP/IP,, (listening). port socket.... mysqladmin TCP/IP % mysqladmin --host=127.0.0.1 --port=port_num variables UNIX localhost UNIX., socket. % mysqladmin --host=localhost --socket=/path/to/socket variables Windows NT., socket. C:\> mysqladmin --host=. --socket=pipe_name variables, TCP/IP, host. 610 MySQL(2/e)

Chapter 10 % mysqladmin --host=host_name variables port. UNIX ps mysqld. datadir,. BSD ps. % ps axww grep mysqld System V ps. % ps -ef grep mysqld ps,., mysqld datadir (, ps ).., UNIX /etc/my.cnf Windows C:\my.cnf [mysqld] datadir. [mysqld] datadir=/path/to/data/directory..,,.. % mysqld --help... datadir /usr/local/mysql/var/... MySQL(2/e) 611

PART 3 MySQL,., Makefile.. datadir, localstatedir., MySQL NFS,..,..frm( ). % find / -name "*.frm" -print.frm, MySQL.frm. ( ).,. MySQL DATADIR,. 10.2 MySQL., UNIX Windows.., InnoDB InnoDB.,. InnoDB. 612 MySQL(2/e)

Chapter 10. my.cnf, ID ( windows ).,..,,. 10.2.1 MySQL /, MySQL mysqld..,,,. [. ]., (listen), ( ).,, SQL,, (select),..., (update), ( serialize, ),. ( ),., MySQL(2/e) 613

PART 3 (listen).,,,. Client 1 Client 2 Client 3 UNIX domain socket (UNIX) TCP/IP port (UNIX, NT) Named pipe (NT) Network Interface MySQL server Data directory Database 1 Database 2... Database n Table 1 Table 2 Table 3 Table 1 Table 2 Table 3 Table 1 Table 2 Table 3,.,.,.,..,.,,.. 614 MySQL(2/e)

Chapter 10 myisamchk isamchk,,.,,..,,. ( CHECK TABLE REPAIR TABLE, ). 10.2.2 MySQL.,., mydb DATADIR/mydb. (SQL ). SHOW DATABASES., MySQL.,,. CREATE DATABASE db_name db_name. UNIX. CREATE DATABASE,. % cd DATADIR % mkdir db_name % chmod u=rwx,go-rwx db_name MySQL(2/e) 615

PART 3. DROP DATABASE. DROP DATABASE db_name db_name. UNIX. % cd DATADIR % rm -rf db_name Windows. C:\> cd DATADIR C:\> del /S db_name DROP DATABASE. DROP DATABASE,.,, ( SHOW DATABASES ). InnoDB, InnoDB. InnoDB, InnoDB DROP DATABASE., rm del. 10.2.3 MySQL. ISAM, MyISAM, MERGE, BDB, InnoDB HEAP. MySQL,.frm.,., (., MySQL SQL ). 616 MySQL(2/e)

Chapter 10 MySQL ISAM. MySQL ISAM,.,., mytbl. mytbl.frm. mytbl.isd ISAM. mytbl.ism. MySQL. MyISAM ISAM, ISAM. ISAM, MyISAM,.frm,.MYD,.MYI, (description),,. MERGE. MyISAM,., MERGE.frm.MRG,.MRG MyISAM,., FLUSH TABLES.MRG MyISAM, MERGE ( ). BDB,.frm.db.. InnoDB. InnoDB MySQL(2/e) 617

PART 3.frm,. InnoDB.,.. HEAP. HEAP,.frm. 10.2.4.frm, SHOW TABLES db_name db_name.frm.. MySQL,.. MySQL, CREATE TABLE.,.frm,.., MyISAM.MYD.MYI, BDB.db /. InnoDB InnoDB. UNIX. ALTER TABLE,.frm,. CREATE INDEX DROP INDEX, ALTER TABLE. 618 MySQL(2/e)

Chapter 10 InnoDB (alter) InnoDB. DROP TABLE., InnoDB InnoDB.,., mydb mytbl ISAM, MyISAM, BDB MERGE, DROP TABLE mytbl, UNIX. % cd DATADIR % rm -f mydb/mytbl.*, Windows. C:\> cd DATADIR C:\> del mydb\mytbl.* InnoDB HEAP, DROP TABLE.,.frm InnoDB. InnoDB. 10.2.5 MySQL.. ( ), ( _ $ ). MySQL.. (, `odd@name`).. MySQL(2/e) 619

PART 3,,.,...frm,., $ MySQL,., UNIX Windows.., $ UNIX. $mydb,. % ls $mydb mydb: Undefined variable. $. % ls \$mydb % ls '$mydb'..,., UNIX Windows, / \,., (, / Windows, UNIX ). MySQL,., UNIX System V.,. 620 MySQL(2/e)

Chapter 10, (.).. ( UNIX ), mytbl MYTBL. (Windows Mac OS X HFS+ ), mytbl MYTBL.. lower_case_table_ names,..,,.,., lower_case_ table_names., MySQL...,.,.,.. 10.2.6 MySQL,.. MySQL.. ISAM,.ISD.ISM GB. MySQL(2/e) 621

PART 3 MyISAM,.MYD.MYI GB., AVG_ROW_LENGTH MAX_ROWS ( D, SQL CREATE TABLE ). MERGE MyISAM. BDB.db. ( ), ( ),. InnoDB, InnoDB, KB (MySQL InnoDB KB KB ). InnoDB.., GB., MyISAM.MYD.MYI., InnoDB. InnoDB.,,. InnoDB, MySQL.... (ISAM MyISAM )..,.,. AUTO_INCREMENT., TINYINT UNSIGNED,. 622 MySQL(2/e)

Chapter 10.,,.,.. ISAM. MySQL GB. GB,.,, GB, MySQL GB. InnoDB InnoDB. InnoDB,., InnoDB. InnoDB.,,, InnoDB (MySQL..,. ). 10.2.7 MySQL.,,.,., ( )..,, MySQL(2/e) 623

PART 3..,.,., MyISAM., MyISAM,,., (Linux ext Solaris ).,., ReiserFS.,..,.,.,.,.,.. ( ), ( ).,.,.,...,. MySQL. 624 MySQL(2/e)

Chapter 10., ( ),. InnoDB. InnoDB.frm, InnoDB InnoDB.,,. InnoDB ( )..frm. 10.2.8, MySQL, [. ]., HOSTNAME. PID ID(PID). PID MySQL(2/e) 625

PART 3., MySQL mysql. server, PID. MySQL..,,,....,,.,. mysql SQL.,..,,...,, (. db ). (create) (insert) (drop). 020727 15:00:17 1 Connect sampadm@localhost on test 2 Query CREATE TABLE mytbl (val INT) 2 Query INSERT INTO mytbl VALUES(1) 2 Query DROP TABLE mytbl 2 Quit 626 MySQL(2/e)

Chapter 10, ( ) ID,,. (, ).. (;), mysql. use test; CREATE TABLE mytbl (val INT); INSERT INTO mytbl VALUES(1); DROP TABLE mytbl;, log long format..,,,.,. # Time: 020727 15:00:17 # User@Host: sampadm[sampadm] @ localhost [] use test; CREATE TABLE mytbl (val INT); # User@Host: sampadm[sampadm] @ localhost [] INSERT INTO mytbl VALUES(1); # User@Host: sampadm[sampadm] @ localhost [] DROP TABLE mytbl; #, mysql..,.,... MySQL(2/e) 627

PART 3,.,.. 020727 15:47:24 4 Query UPDATE user SET Password=PASSWORD('secret') WHERE user='root', MySQL.. 10.3,.,. MySQL...,.., InnoDB,..,.,. 628 MySQL(2/e)

Chapter 10 PID, /var/run. MySQL PID. /var/log, MySQL (,., ).,. 10.3.1.,.,, datadir= dir_name,. [mysqld] datadir=dir_name, [mysqld].,., [embedded]., mysqld_multi [mysqldn], n.,.,.. [. ],., (UNIX /etc/my. cnf Windows c:\my.cnf my.ini ). MySQL(2/e) 629

PART 3 my.cnf ( ).,,, ( ). 10.3.2,. du, df, ls l,.,. /usr/local/mysql df /var /var/mysql ( ). % df /usr /var Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/wd0s3e 396895 292126 73018 80% /usr /dev/wd0s3f 1189359 1111924 162287 15% /var /usr?, du s. % cd /usr/local/mysql/data 630 MySQL(2/e)

Chapter 10 % du -s 133426. MB, /usr.? df. % df /usr/local/mysql/data Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/wd0s3f 1189359 1111924 162287 15% /var. (, /usr), df /var? ls l. % ls -l /usr/local/mysql/data... lrwxrwxr-x 1 mysqladm mysqlgrp 10 Dec 11 23:46 data -> /var/mysql... /usr/local/mysql/data /var/mysql., /var,. /var /usr!.,,. > TIP 10.3.3, MySQL(2/e) 631

PART 3., datadir. my.cnf,. 10.3.4,. UNIX........... bigdb. % mysqladmin -p -u root shutdown Enter password: ****** % cd DATADIR % tar cf - bigdb (cd /var/db; tar xf -) % mv bigdb bigdb.orig % ln -s /var/db/bigdb. % mysqld_safe & MySQL. bigdb.orig.,. % rm -rf bigdb.orig 632 MySQL(2/e)

Chapter 10 Windows.......sym MySQL,., sampdb C:\mysql\data\sampdb E:\mysql book\sampdb, sampdb.sym C:\mysql\data. E:\mysql-book\sampdb\.sym MySQL..,. use symbolic links. [mysqld] use-symbolic-links Windows, MySQL.. max (mysqld max mysqld max nt)., InnoDB InnoDB InnoDB. InnoDB,. > TIP MySQL(2/e) 633

PART 3 10.3.5. MySQL.. realpath(). MyISAM.,.MYD.MYI, (.frm ).. ALTER TABLE, OPTIMIZE TABLE, REPAIR TABLE,.,.,., ALTER OPTIMIZE ( ),. 10.3.6 innodb_data_home_dir innodb_data_file_path InnoDB ( ).,,,....... InnoDB. 634 MySQL(2/e)

Chapter 10..,... 10.3.7 PID,., /tmp/mysql.pid PID, pid file=/tmp/mysql.pid. [mysqld] pid-file=/tmp/mysql.pid,.,., pid file= mysqld.pid, PID mysqld.pid.,.. MySQL(2/e) 635