Troubleshooting common database errors

Knowledge Base

Troubleshooting common database errors


Icons/System/eye-open Created with Sketch. 70 Views 31.03.2026 Web / Web Hosting

Objective

Your database usage may result in anomalies on your website or error messages in the OVHcloud Control Panel, as well as on the phpMyAdmin interface.

Find out how to troubleshoot database errors with OVHcloud Web Hosting plans.

OVHcloud is providing you with services for which you are responsible, with regard to their configuration and management. You are therefore responsible for ensuring they function correctly.

This guide is designed to assist you in common tasks as much as possible. However, we recommend that you contact a specialist service provider and/or discuss the issue with our community if you have difficulties or doubts. You can find more information in the Go further section of this guide.

Requirements


OVHcloud Control Panel Access

  • Direct link: Hosting plans
  • Navigation path: Web Cloud > Hosting plans > Select your web hosting plan

Instructions

"Error establishing a database connection"

error_establishing_a_DB_connection

Check ongoing incidents

First, check on the Web Cloud Status page whether your datacentre, your web hosting cluster, your Web Cloud Databases server, or your database is not affected by an incident on the OVHcloud infrastructure.

Click on the information you are looking for to view the content.

Find the datacentre of your web hosting plan

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

Go to the Hosting plans page, then select the relevant web hosting plan.

Hosting plans

In the General information tab, locate the Datacentre.

Find the cluster and filer of your web hosting plan

Refer to our guide "Finding out the cluster and filer of your web hosting plan".

Find the Web Cloud Databases server name

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

Go to the Web Cloud Databases page, then select the relevant service.

Selecting a Web Cloud Databases server in the OVHcloud Control Panel

Locate Host name in the SQL section of Login information.

Find your web hosting database server

Refer to our guide "Finding your database server".

Verify login credentials for your database

Log in to the file storage space of your Web Hosting plan by FTP and find your website's configuration file (for example, a WordPress website will have a wp-config.php file located in the folder containing your website).

The name and content of the file relevant for database connection information depends on the CMS used for the website. This does not lie in the scope of responsibility of OVHcloud.

We recommend that you contact the publisher of the CMS concerned or a specialised service provider if necessary. We will not be able to assist you with this.

Then check the exact match between the login details for phpMyAdmin and the login details for your website's configuration file.

If necessary, change your database password.

Example for WordPress

If your website displays an "Error establishing a database connection" message and your hosting cluster is not affected by an incident, log in to the FTP storage space of your hosting and open the directory containing your website (by default, this is the www folder).

If this is a WordPress site, open the file wp-config.php.

define('DB_NAME', 'my_database');

/** MySQL database username */
define('DB_USER', 'my_user');

/** MySQL database password */
define('DB_PASSWORD', 'my_password');

/** MySQL hostname */
define('DB_HOST', 'my_server.mysql.db:port');

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

Go to the Hosting plans page, then select the relevant web hosting plan.

Hosting plans

Click on the Databases tab, then check the correspondence between the elements displayed and those in the file wp-config.php:

  • my_database must match what is noted as Database name;
  • my_user must match what is noted as User name;
  • my_password corresponds to your database password;
  • my_server.mysql.db must match the Server address.

If you are unable to restore access to your website as a result of these changes, back up your database then restore it to an earlier date from your OVHcloud Control Panel.

Contact a specialised service provider if necessary. We will not be able to assist you with this.

You have exceeded the authorised quota

You have received an email notification stating that the amount of data on your database exceeds the authorised limit. Your database has therefore been switched to read-only mode. This will prevent your website from being modified.

database-overquota-notification-email

There are three ways you can unblock your database in this situation.

Method 1: Upgrade your subscription

If you have a Starter or Personal Web Hosting plan, we recommend that you switch to the high-performance offer. This subscription change will increase the size of your database which will automatically reopen it. This method is the simplest and does not require any particular technical expertise.

The increase of the size of your database may be linked to a malfunction in your website's internal code.

In this case, changing your Web Hosting plan would be ineffective, as your database will continue to fill up.

If you notice a sudden increase in the size of your database, or if you have a "blog" type site that normally does not use much data, we advise you to contact a specialised service provider as soon as possible. We will not be able to provide you with support on this matter.

To upgrade your subscription, click on the tabs below to view each of the 3 steps in succession.

Go to the Hosting plans page, then select the relevant web hosting plan.

Hosting plans

Click on the ... button in the Solution section on the right-hand side of the screen.

Click Change plan.

If you are already subscribing to a Performance offer, refer to method 2.

Method 2: Migrate your data to a larger database

You can also migrate your data to a new database:

If you have a Performance Web Hosting plan, you can also activate a free Web Cloud Databases service.

Method 3: Delete unnecessary data

Once you have made a database backup, log in to your phpMyAdmin interface to delete any unnecessary data using the Drop, Delete and Truncate commands.

To recalculate the quota, click on the tabs below to view each of the 3 steps in succession.

Go to the Hosting plans page, then select the relevant web hosting plan.

Hosting plans

Click on the Databases tab, then on the ... button next to the database concerned.

Click Recalculate the quota.

This operation requires advanced technical knowledge. We recommend contacting a specialised service provider if you need to use this method. We will not be able to assist you with this.

Method 4: Optimise your database

To optimise your database, follow the instructions in our guide "Configuring your database server".

To recalculate the quota, click on the tabs below to view each of the 3 steps in succession.

Go to the Hosting plans page, then select the relevant web hosting plan.

Hosting plans

Click on the Databases tab, then on the ... button next to the database concerned.

Click Recalculate the quota.

If the advice on how to optimise your database is not sufficient to unblock the access to your website, we recommend you to contact our community or OVHcloud partners. We will not be able to assist you in this regard.

RAM overflows (Web Cloud Databases only)

The following message indicates that your Web Cloud Databases server has consumed too much resources on the OVHcloud infrastructure:

ram-exceeded

To increase the amount of RAM, click on the tabs below to view each of the 3 steps in succession.

Go to the Web Cloud Databases page, then select the relevant service.

Selecting a Web Cloud Databases server in the OVHcloud Control Panel

In the General information tab, locate the RAM section.

Click on the ... button in the RAM section, then click Change the amount of RAM.

To increase the amount of RAM, the database needs to be a standalone service and not one of those included with a Performance web hosting plan. If you want to increase the amount of RAM of a database included in the Performance offers, you first need to detach it.

To detach the database, refer to our guide "Detaching a Web Cloud Databases from your web hosting plan".

You can also optimise your database by following the instructions of our guide "Configuring your database server".

If you experience any difficulties in decreasing the use of resources on your database server, please contact our community of users or OVHcloud partners. We will not be able to assist you with this.

Database import errors

"Access denied for user to database"

"#1044 - Access denied for user to database"

This error message means that the database you are trying to import contains elements that are not authorised on the OVHcloud shared infrastructure.

First make sure that your database is empty. To do this, click on the tabs below to view each of the 3 steps in succession.

Go to the Hosting plans page, then select the relevant web hosting plan.

Hosting plans

Click the Databases tab, then the ... button next to the database, then Recalculate the quota.

If the database is not empty, back up the existing data then delete it before relaunching the import operation.

You can also tick the Empty the current database box just before launching the import:

import-empty-current-db

If necessary, contact our user community or a specialised service provider for more information. We will not be able to assist you in correcting this issue.

Which elements in my database import script can cause a "#1044 - Access denied for user to database" error?

You cannot have a "trigger" in your database's import script on OVHcloud shared hosting servers. In this situation, import your database to a Web Cloud Databases server.

The following query is also not allowed:

CREATE DATABASE IF NOT EXISTS `Database-Name` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

Use this line instead:

USE `Database-Name`;

Replace Database-Name with the name of the database as displayed in your OVHcloud Control Panel.

"MySQL server has gone away"

"ERROR 2006 : MySQL server has gone away"

This error message appears when importing a database on a Web Cloud Databases server. In most cases, it is caused by the quantity of data to be imported being too large or by non-optimised SQL queries in the import script.

To resolve this issue, you can:

  • Increase the amount of RAM. To do this, click on the tabs below to view each of the 3 steps in succession.

Go to the Web Cloud Databases page, then select the relevant service.

Selecting a Web Cloud Databases server in the OVHcloud Control Panel

In the General information tab, locate the RAM section.

Click on the ... button in the RAM section, then click Change the amount of RAM.

  • Split your database in order to import it through multiple operations instead of one. (For any questions on the necessary steps, contact our community or OVHcloud partners. We will not be able to assist you with this.)

  • Optimise your database, then repeat the export/import operations.

Unable to access phpMyAdmin

"Access denied for user"

"mysqli::real_connect(): (HY000/1045): Access denied for user"

This error message may appear when connecting to your database by phpMyAdmin. It indicates that the credentials entered are incorrect.

access_denied_for_user

In this situation, check the credentials entered and change your database password if necessary.

"Too many connections"

"mysqli_real_connect(): (HY000/1040): Too many connections"

The maximum number of active connections for databases delivered with a shared hosting (Start SQL) is 30.

This number increases to 200 for the Web Cloud Databases service. (This setting can be modified in the Configuration section of your database service.)

A "Too many connections" error when connecting to phpMyAdmin appears if this maximum number of connections is exceeded.

In this situation, you will need to optimise your databases in order to reduce the number of active connections.

If you have any questions about the changes you need to make in order to reduce the number of active connections to your database, please contact our community or OVHcloud partners. We will not be able to assist you in this regard.

"Name or service not known"

"mysqli::real_connect(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Name or service not known"

This error message appears when connecting to phpMyAdmin if the server name entered is incorrect.

name_or_service_not_known

Check the server name for the relevant database service.

Click on the relevant situation to view the content.

Database on a web hosting plan

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

Go to the Hosting plans page, then select the relevant web hosting plan.

Hosting plans

Click on the Databases tab. The server name to enter is listed in the Server address column.

Database on a Web Cloud Databases server

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

Go to the Web Cloud Databases page, then select the relevant service.

Selecting a Web Cloud Databases server in the OVHcloud Control Panel

In the General information tab, the server name to enter is listed in the Login information section, under SQL, labelled as Host name.

Unable to connect to a Cloud Databases database

Having a Web Cloud Databases server allows you to connect to your databases from your computer or a server outside of the OVHcloud infrastructure.

If this connection is not possible, first check that you have authorised your public IP address to connect to the database server.

If this operation has been carried out, contact your ISP or the OVHcloud partners. We will not be able to assist you in this situation.

Go further

Getting started with Web Cloud Databases

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

Join our community of users.

Related articles