# Contents

Many Codeanywhere users asked us to enable connection to MySQL databases on DevBoxes. Since we are working tirelessly on improving our services so our users can have the best possible experience using Codeanywhere, we have fulfilled these requests.


To connect MySQL on DevBoxes, follow these instructions:

blog15-3.jpg

Download your private key from the Codeanywhere editor to your local machine and change the file permissions (for Mac and Linux):

1$ chmod 600 codeanywhere.pem

Get the SSH port and DNS of your DevBox from the Box Info. The SSH port will be constant for "Always On” DevBoxes, while for others it will change on reboot.

Create a tunnel from your local machine to your DevBox (via terminal):

1$ ssh -L 3306:localhost:3306 cabox@ssh.{DEVBOX-DNS} -p {DEVBOX-SSH-PORT} -i codeanywhere.pem

Now you can connect to your remote MySQL using: localhost:3306

blog15-1.jpg

If you run into any problems or have any questions, do not hesitate to contact our support team.

We hope you enjoy using your Codeanywhere.

Tags ·
  • mysql
  • devbox
  • database