MYSQL import/export

How To Export and import a mysql database via the command line

 

There are a few different ways to do it (all easy)

mysqldump -h host -u user -p database > dump_file

Second you need to import the sql and data to the database using mysql as follows from a prompt:

mysql -h host -u user -p database < dump_file

Or using phpMyAdmin if it is installed,

 

Be the first to comment

Leave a Reply