× Toggle menu

Connecting to MySQL on DevBoxes

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:

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

$ 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):

$ 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

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.

Ready to start coding from anywhere?

Join the growing community of over ... businesses and professionals that already use Codeanywhere on a daily basis, and you can start coding from anywhere for free.

Sign up for free