Access your MySQL database with Workbench
Databases hosted on Scalingo are not by default directly available on the Internet. To access it, a solution is to setup an encrypted tunnel.
MySQL Workbench lets you configure this tunnel. We will guide through the steps to configure the connection to a Scalingo hosted MySQL through an encrypted tunnel.
Configuration of MySQL
The connection data can be found from the
variable of your application.
$ scalingo env | grep SCALINGO_MYSQL_URL SCALINGO_MYSQL_URL=mysql://my_app_3030:CaUrq1MdUkAzCSEq-1Fg@my-app-3030.mysql.a.osc-fr1.scalingo-dbs.com:30999/my_app_3030
In this case:
- Hostname: my-app-3030.mysql.a.osc-fr1.scalingo-dbs.com
- Port: 30999
- User: my_app_3030
- Password: CaUrq1MdUkAzCSEq-1Fg
- Database: my_app_3030
You first need to select “Standard TCP/IP over SSH” as “Connection Method”. Then, fill the fields accordingly:
The “SSH Key File” should target the private key associated to the public key you’ve added in the “SSH” tab on your Scalingo Profile.
The “SSH Username” is always
The “SSH Hostname” and “SSH Port” depends on the region your database is deployed on: