Extracting a remote MySQL Database without MyODBC?

13,728

MySQLDump has a -h parameter to connect to a remote host.

First try the mysql client application:

mysql -h your.server.com -uYourUser -pYourPass

If that works, use the same format for MySQLDump

mysqldump -h your.server.com -uYourUser -pYourPass --all-databases

Edit for ajreal:

By default, mysqld (the MySQL server) will run on 3306, and mysql (the client application) will connect using that port. However, if you changed your configuration, update your command accordingly. For example for port 3307, use

mysql -h your.server.com -P 3307 -uYourUser -pYourPass

Check your MySQL configfile to see how you can connect to your MySQL server.

Share:
13,728
rockstardev
Author by

rockstardev

Updated on June 20, 2022

Comments

  • rockstardev
    rockstardev almost 2 years

    Is there a way to get a MySQL Dump of a database that is not stored locally. I have the connection string to the database located on another server, but it doesn't seem like MySQLDump wants to do anything if the server is remote.