Fraz Fraz - 1 year ago 93
MySQL Question

Export dump file from MySql

I want to create a dump file of the a table in the database.
So database--> king
tablename --> castle
So what I want to do is create a dump file..
and then the next part is to import it in my local host.
datbase name--> king_local
Any ideas on how to go about this!!

Answer Source

To export:

 mysqldump -u mysql_user -p DATABASE_NAME > backup.sql

To import:

 mysql -u mysql_user -p DATABASE < backup.sql
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download