O'Reilly logo

MySQL 8 Cookbook by Karthik Appigatla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Backup from a remote server

Sometimes, you may not have SSH access to the database server (as in the case of cloud instances such as Amazon RDS). In those cases, you can use mysqldump to take a backup from a remote server to the local server. For this, you need to mention hostname using the --hostname option. Make sure that the user has appropriate privileges to connect and perform a backup:

shell> mysqldump --all-databases --routines --events --triggers --hostname <remote_hostname> > dump.sql

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required