By Hank Alper
My Centos 6 droplet is running MySQL 5.1 . I have created and have been running an extensive database on the droplet .I’ve been controlling the droplet via a Putty console on my Windows 7 machine. What would be the best way for me to back up the content of my MySQL database onto my Windows machine and restore from it to the droplet ?
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!
The most direct method would be to use mysqldump to create a backup of your database as a .sql file. This guide from the official documentation should be helpful.
To re-import this data to your server you would want to drop all tables in your database and then import the .sql file:
mysql -uroot -p mydatabase < mybackup.sql
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.