Taking MySQL dump from another machine

In General if you have the credentials for accessing MySql from Machine B.

You should have MySQL user name , host name and Password.Then You can write the Command for taking backup

On Machine B Write

mysqldump -h Your_host_name -u user_name -p password --all-databases > backup.sql

If You Face issues there may be some network issue try some things as

  1. Use ping with ip address to check that DNS isn't broken. eg. ping Machine A
  2. Use mysql client to connect from B to A. eg mysql -u user -pPASS --host=Host_Name --port=3306 (substitute whatever port you are connecting to the master on)

if you use --host MachineA as parameters of mysqldump should work


This is for taking a dump of a specific table

mysqldump -h 'hostname' -vv -u'user' -p'password' database_name table_name | gzip > table_name.sql.gz