Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use MySQL dump from a remote machine

How can I backup a mysql database which is running on a remote server, I need to store the back up file in the local pc.

like image 475
Harsha Avatar asked Dec 09 '11 10:12

Harsha


People also ask

How do I export a MySQL database dump?

Step 1 — Exporting a MySQL or MariaDB Database You will need your database's name and credentials for an account whose privileges allow at least full read-only access to the database. Use mysqldump to export your database: mysqldump -u username -p database_name > data-dump.

How do I run a MySQL dump file in Windows?

To dump/export a MySQL database, execute the following command in the Windows command prompt: mysqldump -u username -p dbname > filename. sql . After entering that command you will be prompted for your password.


1 Answers

Try it with Mysqldump

#mysqldump --host=the.remotedatabase.com -u yourusername -p yourdatabasename > /User/backups/adump.sql 
like image 116
CloudyMarble Avatar answered Sep 29 '22 10:09

CloudyMarble