Is it possible to connect to a MySQL database from the internet?

It can be useful to set up a connection from, for example, your own computer to a database on bHosted.nl's servers. This is possible, but it requires a number of actions. This is only possible via a so-called SSH tunnel.

The default settings at bHosted.nl do not allow such a connection, so a number of adjustments need to be made:

  1. Request SSH access via the option Ask a question in the control panel (https://mijn.bhosted.nl).
  2. In DirectAdmin, to be safe, an extra access host must be added to the database user:
    1. Log in to the control panel (https://mijn.bhosted.nl)
    2. Click through to MySQL management
    3. Click on the database name of the database you want to access
    4. Enter 127.0.0.1 in the input field at the bottom of the screen and press Add Host

Once you have received confirmation from the bHosted.nl helpdesk that SSH has been opened, you can try to establish the connection.

The database host is localhost. The SSH server is the name of the server on which your website runs (e.g. s05.servitnow.nl). If you do not know the name of the server on which your website runs, please contact the helpdesk.

Related articles