Tuesday, 15 May 2012

MYSQL Dump in linux

You can take MYSQL Dump using the following command

mysqldump  -u[UserName] -p[Password] dbName > /<directory to save>/filename.sql

Taking multiple databases dump at the same time

mysqldump  -u[UserName] -p[Password] [dbName1] [dbName2] ... > /<directory to save>/filename.sql

Taking dump of  Particular table in databases

mysqldump  -u[UserName] -p[Password] [dbName] [table_Name] > /<directory to save>/filename.sql

Takinge dump of  all databases

mysqldump  -u[UserName] -p[Password] -all-databases > /<directory to save>/filename.sql

No comments:

Post a Comment