Manual:$wgDBserver/pt
From Linux Web Expert
<translate> Database settings</translate>: $wgDBserver | |
---|---|
Host name or IP address of database server. |
|
<translate> Introduced in version:</translate> | pre 1.1.0 |
<translate> Removed in version:</translate> | <translate> still in use</translate> |
<translate> Allowed values:</translate> | (string) |
<translate> Default value:</translate> | 'localhost' |
<translate> Other settings:</translate> <translate> Alphabetical</translate> | <translate> By function</translate> |
Detalhes
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 = '127.0.0.1:3308';
.
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';
.
Use IP addresses where possible to avoid the overhead of a DNS lookup for every single connection to the wiki.
$wgDBserver = '000.000.000.000';
will be faster than $wgDBserver = "wiki.example.org";
.$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 127.0.0.1
increase the time to connect to the database a lot. So, in windows, it's recommended to use 127.0.0.1
instead of localhost
if MySQL is on the same machine. See this forum thread.
Ver também
- $wgDBservers - * $DBservers: para configurações de múltiplos servidores (master/escravo).