Manual:$wgDBadminpassword

Details
Database password 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 $wgDBadminuser in LocalSettings.php, but is optional.