Search code examples
mysqlsslreplication

mysql replication without direct connection


I am trying to replicate a remote mysql database to my internal mysql server.

The problem is that I do not have a direct connection available between both mysql servers.

Internally, there is a custom server application (which I've developped my self). This server application allows incoming connections on 1 port only (with ssl encryption). Once the connection is made, custom written commands can be executed over that connection (like sending specific backup files, remote browsing, etc... just client/server stuff).

Now I need to add mysql replication, but there is no direct connection possible. I was thinking to write something like a PORTFORWARD command in my server app which would transfer the replication data to the mysql server interally, something like this:

remote mysql server replication process->remote client application->internal server application-> internal mysql server.

That would probably work, but I think that's gonna be a fragile solution, all connect/disconnect events will need to be forwarded in all circumstances.

Any better ideas for this?

Thanks, Vincent


Solution

  • Replication in the sense do you want the Remote server database data's to your Internal server? if So you could follow Backup and Restore MySQL Database Using mysqldump

    Or If want your client server application to access the remote server database follow this Can't remotely connect through SQL Server Management Studio