Monday, April 23, 2012

Dumping mysql database schema only


If  you want to dump only schema of a database,

Execute the following command.
#mysqldump -u root -pPASSWORD -d -h Host_name_or_Ip_Address database_name > database_name.sql
It will dump the schema to the file database_name.sql

If you just want it on the console only, then
#mysqldump -u root -pPASSWORD -d -h Host_name_or_Ip_Address database_name

Recommended Reading

1. High Performance MySQL: Optimization, Backups, and Replication
2. MySQL (4th Edition)
3. MYSQL in a Nutshell (In a Nutshell (O'Reilly))

No comments:

Post a Comment

Be nice. That's all.