Access your database
Databases hosted on Scalingo are not directly available on the Internet. By default access to most databases are unencrypted, so unsecure. Applications are on the same network than your database, but you can not connect your machine to it directly.
We’ve built two different solutions to access Scalingo’s databases:
- Remote console: an interactive console is started and you access it directly.
- Encrypted tunnel: if you want a full access to the database, you have to build an SSH-encrypted tunnel, then you’ll be able to access the database as if it was running locally. You have to use this solution if you want to import/export data.
Open an interactive remote console
You need to have Scalingo's command line interface to achieve this action.
The following commands let you open a console for the database of your choice. Note that your should have added the appropriate addon from your application dashboard prior to run one of these commands.
# Open a console using the `mysql` client scalingo -a example-app mysql-console # Open a console using the `psql` client scalingo -a example-app pgsql-console # Open a console using the `mongo` client scalingo -a example-app mongo-console # Open a console using the `redis-cli` client scalingo -a example-app redis-console
Connect your workstation to the database
To access them remotely from your workstation you need to setup an encrypted connection.