The Pursuit of Happyness

은근히 유용한 팁

  1. Dump (Backup 및 Migration)
    [전체 Dump]

    Usage : #> mysqldump -u{userid} -p{password} DatabaseName > file_name.sql
    ex) mysqldump -uroot -proot!@# dev_db > dev_dump.sql
    [Table Dump]
    Usage : #> mysqldump -u{userid} -p{password} DatabaseName TableName > file_name.sql
    ex) mysqldump -uroot -proot!@# dev_db board > board_dump.sql
  2. 복구
    [전체 Dump 했을 경우]
    Usage : #> mysql -u{userid} -p{password} DatabaseName < file_name.sql
    ex) mysql -uroot -proot!@# dev_db < dev_dump.sql
    [Table Dump 했을 경우]
    Usage : #> mysql -u{userid} -p{password} DatabaseName TableName < file_name.sql
    ex) mysql -uroot -proot!@# dev_db board < board_dump.sql

이 자료는 negafix 님 블로그에서 퍼왔습니다. (http://negafix.tistory.com/27)

Comment +0