Thursday, December 13, 2012

MySQL - Export and import table schema

Export a database with only tables:
mysqldump --no-data --tables -u{username} -p{password} {database} > {sqldump_filename}

Import:
mysql -u{username} -p{password} {database} < {sqldump_filename}

No comments:

Post a Comment