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!
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.