MySQL 덤프방법(dump)
testuser 라는 디비계정의 사용자가 testdb 라는 디비에 대해 작업을 하고
해당 디비에 testtable1,testtable2,testtable3 이라는 테이블이 있을 경우
1. testdb 의 모든 테이블의 스키마 및 데이타를 모두 덤프 받으려 할 경우
$ mysqldump -u testuser -p testdb > testdb.sql
2. testdb 의 모든 테이블의 스키마만 덤프받으려 할 경우
$ mysqldump -u testuser -p -d testdb > testdb.sql
3. testdb 의 testtable1 테이블의 스키마 및 데이타를 모두 덤프 받으려 할 경우
$ mysqldump -u testuser -p testdb testtable1 > testdb_testtable1.sql
4. testdb 의 testtable1 테이블의 스키마 및 데이타중 일부를 덤프 받으려 할 경우 ( no 가 testtable1 의 필드명일 경우 )
$ mysqldump -u testuser -p testdb testtable1 -w 'no > 1 and no < 100' > testdb_testtable1.sql
옵션설명 :
-u : 사용자명 입력
-p : 비밀번호 입력
-d : 데이타 덤프 안함
-w : WHERE 절 입력함 (단일 따옴표인것에 주의)<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:27:00 MySQL에서 이동 됨]</div>
해당 디비에 testtable1,testtable2,testtable3 이라는 테이블이 있을 경우
1. testdb 의 모든 테이블의 스키마 및 데이타를 모두 덤프 받으려 할 경우
$ mysqldump -u testuser -p testdb > testdb.sql
2. testdb 의 모든 테이블의 스키마만 덤프받으려 할 경우
$ mysqldump -u testuser -p -d testdb > testdb.sql
3. testdb 의 testtable1 테이블의 스키마 및 데이타를 모두 덤프 받으려 할 경우
$ mysqldump -u testuser -p testdb testtable1 > testdb_testtable1.sql
4. testdb 의 testtable1 테이블의 스키마 및 데이타중 일부를 덤프 받으려 할 경우 ( no 가 testtable1 의 필드명일 경우 )
$ mysqldump -u testuser -p testdb testtable1 -w 'no > 1 and no < 100' > testdb_testtable1.sql
옵션설명 :
-u : 사용자명 입력
-p : 비밀번호 입력
-d : 데이타 덤프 안함
-w : WHERE 절 입력함 (단일 따옴표인것에 주의)<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:27:00 MySQL에서 이동 됨]</div>
댓글 1개
21년 전
간혹 경로도 적어 주어야 하는경우도 있던애요.
-h localhost -h ip주소.. 이렇게..
디비서버가 별도로 존재하는경우는 이렇게 한문장을 더 넣어야 할것입니다.
예)
$ mysqldump -h useripaddress -u testuser -p -d testdb > testdb.sql
-h localhost -h ip주소.. 이렇게..
디비서버가 별도로 존재하는경우는 이렇게 한문장을 더 넣어야 할것입니다.
예)
$ mysqldump -h useripaddress -u testuser -p -d testdb > testdb.sql
게시글 목록
| 번호 | 제목 |
|---|---|
| 793 | |
| 790 |
JavaScript
포토샵 액션 AutoGaussian-피부질감 수정
2
|
| 784 |
Flash
토수니
5
|
| 782 | |
| 775 | |
| 774 |
JavaScript
아파치 웹서버 프로세스 갯수 늘리기
|
| 771 | |
| 17824 |
HTML
첫 게시물..^^ 포토샵 단축키
10
|
| 769 |
JavaScript
css를 이용한 기본적인 레이아웃..
1
|
| 768 | |
| 767 | |
| 766 |
JavaScript
불여우에서도 되는 서브메뉴가 있는 메뉴 #2
|
| 765 | |
| 764 | |
| 763 | |
| 761 |
MySQL
데이터베이스 를 사용자 계정에 설치하기
1
|
| 760 |
MySQL
gd+jpg+png+tiff rpm 설치..
|
| 745 | |
| 732 |
MySQL
php 오류정리
12
|
| 731 | |
| 730 |
기타
사용자 계정 삭제
|
| 729 |
JavaScript
chmod 허가권변경
|
| 728 |
기타
소유권변경
|
| 727 | |
| 721 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기