logo

Cyber Rea

  •  99,9 % uptime
  •  Gratis SSL-certifikat
  •  24/7 Live-support
  •  30 dagars öppet köp
Kom igång

Upp Till

90

%

OFF

04
DAGAR
11
TIMMAR
18
MINUTER
33
SEKUNDER
Cyber Rea: Webbhotell
Från kr9,00 /Månad!
Se Alla Erbjudanden
×

Kunskapsbas

Hitta artiklar om funktioner och felsökningsguider,
och andra tekniska information om Hostingers webbhotelltjänst.

How to fix "Error establishing a database connection"

Redigerat:
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