Report this

What is the reason for this report?

mysqldump on an Ubuntu PhpMyAdmin droplet

Posted on January 28, 2020

I’m trying to download a huge database from a droplet, its probably too big for PhpMyAdmin so i’m trying to run mysqldump from terminal and the sftp to grab the resulting file, however every option i try via terminal fails, usually with : mysqldump “unknown option -b”, but i’ve had other issues with the command getting the password confused with the table names, is there something wrong in my script, or is the version of mysqldump on this type of server not standard?

mysqldump -u user -p password -databases my_db > /home/database-dump.sql

also tried with no space after the p:

mysqldump -u user -ppassword -databases my_db > /home/database-dump.sql



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @gabba,

You are almost doing the proper command, here it is

mysqldump -u User -p NameOfDatabase -h localhost > /home/database-dump.sql

Once you run the command, you’ll be asked to add type in the password. Paste it in the terminal and hit enter.

That’s it, you should now have your dump file.

Regards, KDSys

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.