Manual:$wgDBport

Details
Port number used by the database. If left blank, the appropriate port number is used, depending on the DB system being used (as specified by $wgDBtype):


 * MySQL : Unused. Set $wgDBserver to "hostname:port" if you need nonstandard port.
 * Postgres: 5432