Steps to Reproduce:
Install MediaWiki 1.32.0 on a host. Configure with MySQL. Set a username and password for the database. MediaWiki will be unable to connect to the remote database.
I noticed this when upgrading from MediaWiki 1.31.1 to 1.32.0. I have MediaWiki installed on one host, and the single instance database server is on another. I have configured a username and password for database access. This works fine with MediaWiki 1.31.1, but does not work with 1.32.0.
The maintenance script fails with a cryptic error:
[b080c820fa73e75fafd9df0a] [no req] Wikimedia\Rdbms\DBConnectionError from line 1195 of /path/to/w-/includes/libs/rdbms/loadbalancer/LoadBalancer.php: Cannot access the database: Unknown error (example.com)
Enabling additional logging shows the following:
Sat Mar 9 14:11:45 UTC 2019 wiki.example.com wtpa_mediawiki Error connecting to example.com: :real_connect(): (HY000/1045): Access denied for user 'user'@'wiki.example.com' (using password: NO)
However, my LocalSettings.php has $wgDBpassword set, and the configuration works fine with MediaWiki 1.31.1.
Actual Results:
Error connecting to database.
Expected Results:
No error connecting to database.