Manual:$wgDBadminuser

Details
Database username that can be used when running maintenance scripts.

Prior to MediaWiki version 1.16,  was set in AdminSettings.php.

In newer versions it can still be set along with $wgDBadminpassword in LocalSettings.php, but is optional.