1) To Export a database, open up terminal, making sure that you are not logged into MySQL and type
mysqldump -u [username] -p [database name] > [database name].sql
mysqldump -u root -p admin_ghc > admin_ghc.sql
2) To import a database, first create a new blank database in the MySQL shell to serve as a destination for your data.
CREATE DATABASE newdatabase;
mysql -u [username] -p newdatabase < [database name].sql
3) stop the MySQL process
/etc/init.d/mysql stop