How do I export and import a mysql database?

Export a mysql database to a file:

mysqldump -u {database_username} -p {database_password} {database_name} > {filename}.sql

Read in a database export:

mysql -u {database_username} -p {database_password} {database_name} < {filename}.sql

Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.