good_evening good_evening - 3 months ago 9
MySQL Question

How to export databases through command line?

I have URL of phpMyAdmin, I have username and password. How can I export all those databases? Because phpMyAdmin crashes when I try to export them, so I want to try it through command line.

Answer
mysqldump -uUSERNAME -pPASSWORD -hHOSTNAME USER_DATABASE > FILENAME.sql

Then import using:

mysql -uUSERNAME -pPASSWORD -hHOSTNAME USER_DATABASE < FILENAME.sql