How to clone database?

So I should connect my local project to the database on my server? I want to host everything from a VPS because my school provides me with a free VPS and I learn alot more about Linux.