How to import database in MySQL from Windows machine to my DO droplet


I have a Joomla website which I need to migrate from shared hosting to DO droplet having CentOS 7 installed on it.

I have already taken the whole website backup including the database on my Windows 7 machine.

I have tried to create the necessary environment by installing Apache, MySQL, PHP.

I have also created an empty database and the username having the same name as that in the configuration.php file.

Now, before i move Joomla files to a new location, I need to have the newly created empty database replaced/restored/populated with the old(backed-up) database.

So, how do I migrate and restore that database to DO droplet?

I am using Putty as an SSH client to connect to my DO server.

Submit an answer

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!

Sign In or Sign Up to Answer

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.


You can upload the backup file for the database and import it over command line. On Windows, perhaps SFTP using FileZilla would be the easiest way:

Now let’s say you’ve ended up with a file named “backup.sql” in /root, and you want to import it to your new database which I’ll assume is named “joomla.” In that case, over SSH I would run this:

mysql joomla < /root/backup.sql

Then you’re done :)