How to Import/Export MySQL Databases with SSH

Started by cm27, May 11, 2014, 02:59:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cm27

For those that do not want to use a control panel here you go.



    To export a MySQL database, access your VPS via SSH and run:

        # mysqldump -u username -p database_name > dumpfile.sql


    To import a MySQL Database, run:

        # mysql -u username -p database_name < dumpfile.sql
Never fall to those that just sit there.. Always look for the way to the top even if you have to code it your self and mistakes and all... quote from BonZO...