Docker: Connecting To Remote Database

I have setup a local PHP staging with Docker and it works great! What I would like to do is connect to the existing remote MySQL database on our production host. If this is possible, are there any instructions on how to edit the database section of the Docker settings so that we can connect to our remote MySQL database?

Thank you for your suggestions.

All you need do is use the DB Connector as normal and Docker will communicate with it seamlessly. No different to a standard set-up, no special configuration required @revjrblack

Or you can take full advantage and replicate your DB to the Docker DB within the container, backup your DB using your tool of choice, connect to the Docker DB, restore.

Thank you Dave! I will try it this morning. I appreciate the help very much.

1 Like