How to import/export mysql database from SSH?

From SSH command line, issue the following command:


mysql -u username -p database_name < dumpfile.sql
* for importing mysql database

mysqldump -u username -p database_name > dumpfile.sql
* for exporting mysql database

  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

How can to increase the maximum attachment in webmail?

You need to increase the PHP directives below from the php.ini (/etc/php.ini) file....

Blank page in Horde webmail

When opening an email from Horde webmail, the frame that's suppose to show the message came up as...

Allow directory listing in Linux VPS

To allow directory listing or directory browsing in your Linux VPS, create a .htaccess file (Yes,...

Upgrading PHP

By default, PHP that's on Linux VPS is version 5.1.6. In case your web application requires...

Cannot save Firewall rules in VZ Power Panel

If you encounter a problem where-in you cannot save a rule from Firewall in Power Panel, then it...