Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Ajvanho's avatar
Level 14

Download db with SSH

I am into SSH for my server and i want to download databse.

ssh forge@**************

Now I am in mysql cli, and I choose db that I want to download.

mysql> use foo_db

What next?

0 likes
3 replies
Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

You can do it with one command

ssh forge@*** "mysqldump dbname -u username -p --single-transaction" > /path/to/local/file.sql

Please or to participate in this conversation.