Thứ Tư, 29 tháng 8, 2012

Take the dump of database from the console

Take the dump of database from the console

To take dump of whole database:
$ mysqldump -u <username> -p <databasename> > <filename>.sql
To take dump of the (only)structure of the database
$ mysqldump -u <username> -p <databasename> -d > <filename>.sql
To take dump of the (only)data of the database
$ mysqldump -u <username> -p <databasename> -t > <filename>.sql
To take dump of the database with complete insert statement
$ mysqldump -u <username> -p <databasename> -c > <filename>.sql

Không có nhận xét nào:

Đăng nhận xét