Jump to navigation Jump to search
This page is a translated version of the page Manual:$wgDBserver and the translation is 43% complete.

Other languages:
English • ‎Nederlands • ‎dansk • ‎español • ‎français • ‎magyar • ‎polski • ‎português do Brasil • ‎русский • ‎فارسی • ‎中文 • ‎日本語
Paramètres de la base de données: $wgDBserver
Nom d'hôte de la base de données ou adresse IP.
Introduit dans la version :pre 1.1.0
Retiré dans la version :Encore utilisé
Valeurs autorisées :(chaîne)
Valeur par défaut :'localhost'


Database host name or IP address. Found in LocalSettings.php .

If you are using MySQL on a non-standard port, you can use the "hostname:port" syntax, for example $wgDBserver = "";. Note that using a port number when you specify localhost as the host name will have no effect, as MySQL will connect through a socket instead. If the MySQL server is on the same server and you want to connect through a socket in a non-standard location, you can use the "localhost:socket" location, for example $wgDBserver = "localhost:/var/run/mysql/mysql.sock";.

Tip: Use IP addresses where possible to avoid the overhead of a DNS lookup for every single connection to the wiki. $wgDBserver = ""; will be faster than $wgDBserver = "";

$wgDBport is only for PostgreSQL configuration.
On Windows, having MySQL as the backend, some users report that using localhost for the server name instead of increase the time to connect to the database a lot. So, in windows, it's recommended to use instead of localhost if MySQL is on the same machine. See this forum thread.

Voir aussi

  • $wgDBservers : pour les configurations à serveurs multiples (maître/esclave).