Export mysql database

Yesterday My classmate Rinku asked me how to export mysql database. He said that using PhpMyAdmin is pain to download the database everyday. So he needs a button which will do the job of PhpMyAdmin in a single step. That is why he needs the system of exporting a database. I knew how to import database, it is a simple command line script. %mysqlimport -p -u root < file_name.sql. But I dont know about exporting a database. Because I need to export database rarely. I told him to try with mysqlexport command. But this is not an sql comman. This does not work. I came home and googled about it.

I found that exporting a database is also known as dumping. The command is %mysqldump -p -u user_name database_name > file_name.sql.

Simple! Isn’t it?

Tags:, , ,

This entry was posted on Thursday, February 11th, 2010 at 7:29 pm and is filed under Uncategorized, University life.

You can follow any responses to this entry through the RSS 2.0 feed.

You can leave a response, or trackback from your own site.

Leave a Reply