Manual:$wgDBserver

Details
Database host name or ip address. Found in LocalSettings.php.

Tip: 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  = "x.y.org"

If you are using MySQL on a non-standard port you can use the "hostname:port" syntax, for example $wgDBserver = "localhost:3308". $wgDBport is only for PostgreSQL.