Page MenuHomePhabricator

"mysqli->real_connect()" can fail awkwardly without setting "error_code", plus bonus issues
Closed, ResolvedPublic

Description

See PHI1413. An install with a non-writable local.conf stumbled across some misleading MySQL errors and a generally poor NUX.

I think there are several adjacent issues here:

  • Since D20350, we log retries to the error log or stderr. However, this is not really appropriate during setup with $config_optional, since we expect that the database may be misconfigured. We should silence these messages if we're doing a $config_optional startup and establishing a database config source connnection.
  • Some invocations of mysqli->real_connect() may fail without setting an error number. This is just PHP being PHP.
  • The writable failure message in bin/config is a big stack-tracy mess, but this is a routine error, especially with Docker.