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.
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.
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.
Try it with Mysqldump
#mysqldump --host=the.remotedatabase.com -u yourusername -p yourdatabasename > /User/backups/adump.sql
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With