How To Export MySQL Database Using SSH

Hello devs,

In this export mysql database command line linux tutorial, I will show you how to export mysql database from a remote server using command line interface. If you don't know how to export mysql using command line then this example is for you.

Sometimes we need to export mysql database from our remote server. We can do it very easily with command line with ssh. So from this example, you will learn ssh export mysql database using terminal.

To export mysql database, just follow the below step to complete:

#first login to your server

ssh your_username@your_host

#then run

mysqldump --databases  your_db_name_to_be_downloaded > your_file_name_to_stored


Read also: How to Download File from Remote Server to Local Computer


Hope, it can help you.