Conoscenza di base

Trova gli articoli informativi sulle funzionalità, sulle guide per la risoluzione dei problemi,
sulle altre informazioni tecniche relative al servizio hosting di Hostinger.

How to fix "Error establishing a database connection"

Modificato il:
database wordpress error establishing connection mysql sql

If you ever see the 'Error establishing a database connection' message, this usually means that your website failed to connect to the database due to incorrect database configuration settings. For example, WordPress's database configuration file is wp-config.php, located in your WordPress installation's root (main) folder.

The most common causes are:

- Incorrect MySQL hostname used.
Make sure you are using the correct hostname. Hostinger does not use localhost, make sure you find out your accounts MySQL hostname.

- Incorrect MySQL username / password or database name.
Make sure to check the database name, username and password that your configuration file is using, it has to be identical to the information in your MySQL details page. Try to avoid using any special characters, such as "',~{]{]@", if you are having issues connecting to your database. Try changing your database password if you are unsure if you are using the correct password.

For further troubleshooting of this issue, consider checking out these tutorials:

https://www.hostinger.com/tutorials/wordpress/wordpress-error-establishing-database-connection
https://www.hostinger.com/tutorials/wordpress/how-to-find-out-Wordpress-database-name

  • Costruttore Sitoweb Semplice
  • Garanzia Uptime 99.9%
  • Supporto Live 24/7
  • Powerful Control Panel
  • Garanzia di rimborso di 30 giorni
Offerta a tempo limitata!
Da
1
45
/mese
Risparmia il 82%
Inizia Ora