patternsqlMajor
Taking MySQL dump from another machine
Viewed 0 times
dumpmysqlanothermachinefromtaking
Problem
I have a MySQL db on Machine A and I want to access the mysqldump from machine B.
Both machines are running on Linux and I also have the credentials of both, but I can't access the mysqldump. What can I try?
Both machines are running on Linux and I also have the credentials of both, but I can't access the mysqldump. What can I try?
Solution
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
If You Face issues there may be some network issue try some things as
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.sqlIf You Face issues there may be some network issue try some things as
- Use ping with ip address to check that DNS isn't broken. eg. ping Machine A
- 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)
Code Snippets
mysqldump -h Your_host_name -u user_name -p password --all-databases > backup.sqlContext
StackExchange Database Administrators Q#13625, answer score: 28
Revisions (0)
No revisions yet.