Web Cloud Databases - Connecting to a database

Knowledge Base

Web Cloud Databases - Connecting to a database


Icons/System/eye-open Created with Sketch. 76 Views 24.03.2026 Web / Web Cloud Databases

Objective

You can view the content of your database via an interface. There are several ways to connect to it.

Find out how to connect to your database on your database server.

Requirements


OVHcloud Control Panel Access

  • Direct link: Web Cloud Databases
  • Navigation path: Web Cloud > Web Cloud Databases > Select your database service

Instructions

Web Cloud Databases solutions do not provide access to the database management system itself, but to the databases hosted on it.

  • There is no super user "root" access.
  • Generic SQL commands work normally, and software such as HeidiSQL, SQuirreL SQL or Adminer is fully compatible.

Connect to a MySQL or MariaDB database

Since MariaDB is a fork of MySQL, the commands are exactly the same for both types of databases.

Connection via OVHcloud phpMyAdmin

Click on the tabs below to view each of the 4 steps.

Go to the Web Cloud Databases page, then select the solution concerned.

Web Cloud Databases

Retrieve the following connection information:

  • Server (hostname) and port: visible in the General information tab, Login information section.
  • Username: visible in the Users and rights tab.
  • Password: the password associated with the user. If you have forgotten it, go to the Users and rights tab, click ... to the right of the user concerned, then Change password.

If you change the password for a database user, all applications/websites that access this database must be updated accordingly.

In the General information tab, locate the Database administration section and click the phpMyAdmin link under User interface.

web-cloud-databases

On the phpMyAdmin login page, enter the information retrieved in step 2:

web-cloud-databases

  • Server: enter the hostname followed by the port number, separated by ":" or a "space". For example: aaXXXXX-XXX.eu.clouddb.ovh.net:12345.
  • Username: enter the username.
  • Password: enter the password.

If the connection is successful, the following page will appear.

web-cloud-databases

In case of error:

  • Error #1045 means the credentials are incorrect. Check your username and/or password.
  • Error #2005 means the server name should be checked, and whether it is functioning correctly.

Connection to the database outside the Control Panel

If you are using a "Web Cloud Databases"/"Private SQL" solution, remember to authorise your IP using the guide on configuring your database server.

Click on the tabs below to view each of the 2 steps.

Go to the Web Cloud Databases page, then select the solution concerned.

Web Cloud Databases

Retrieve the following connection information:

  • Server (hostname): visible in the General information tab, "Database administration" section, "Hostname" in the SQL part.
  • Port: visible in the same location, "Port" in the SQL part.
  • Username: visible in the Users and rights tab.
  • Password: the password associated with the user concerned.
  • Database name: visible in the Databases tab.

Click on the connection method of your choice to view the content.

Command line connection
mysql --host=server --user=user --port=port --password=password database_name
PHP script connection
1. <?php
2. $db = new PDO('mysql:host=host;port=port;dbname=dbname', 'username', 'password');
3. ?>
Software connection (SQuirreL SQL)

In our example, we use the open-source software SQuirreL, but other interfaces such as HeidiSQL or Adminer are fully compatible.

  • Launch SQuirreL SQL and click on Aliases, then on +

launch SQuirreL SQL

  • Fill in the fields below and confirm with the OK button:
    • Name: Choose a name
    • Driver: Choose "MySQL Driver"
    • URL: Enter the server address and port in the form jdbc:mysql://server:port
    • User Name: Enter the username
    • Password: Enter the password

config connection

  • Confirm again with the Connect button

valid connection

You are now connected to your database:

config connection

phpMyAdmin connection

You can use your own phpMyAdmin interface to explore the content of your database. To do this, install phpMyAdmin on your own server or web hosting plan. During installation, make sure you correctly configure the information for your database server and desired database so that phpMyAdmin can connect to it.

Connect to a PostgreSQL database

Click on the tabs below to view each of the 2 steps.

Go to the Web Cloud Databases page, then select the solution concerned.

Web Cloud Databases

Retrieve the following connection information:

  • Server (hostname): visible in the General information tab, "Database administration" section, "Hostname" in the SQL part.
  • Port: visible in the same location, "Port" in the SQL part.
  • Username: visible in the Users and rights tab.
  • Password: the password associated with the user concerned.
  • Database name: visible in the Databases tab.

Click on the connection method of your choice to view the content.

Command line connection
psql --host=server --port=port --user=user --password=password database_name
PHP script connection
1. <?php
2. $myPDO = new PDO('pgsql:host=host;port=port;dbname=dbname', 'username', 'password');
3. ?>
Software connection (SQuirreL SQL)

In our example, we use the open-source software SQuirreL, but other interfaces such as HeidiSQL or Adminer are fully compatible.

  • Launch SQuirreL SQL and click on Aliases, then on +

launch SQuirreL SQL

  • Fill in the fields below and confirm with the OK button:
    • Name: Choose a name
    • Driver: Choose "PostgreSQL"
    • URL: Enter the server address and port in the form jdbc:postgresql://server:port/database
    • User Name: Enter the username
    • Password: Enter the password

config connection

  • Confirm again with the Connect button

valid connection

You are now connected to your database:

config connection

Go further

Web Hosting - My database is full, what should I do?

For specialised services (SEO, development, etc.), contact OVHcloud partners.

If you would like assistance using and configuring your OVHcloud solutions, please refer to our support offers.

Join our community of users.

Related articles