Page MenuHomePhabricator

Database status page throws an exception if `mysql.host` not explicitly set in a clustered environment
Closed, ResolvedPublic

Description

Documentation led me to believe that I no longer needed to have mysql.host set in my configuration, but after I removed it, I got a user@localhost cannot connect to mysql error.

Event Timeline

I can't immediately reproduce this. Here's things running fine with mysql.host set to a bogus value:

Screen Shot 2016-05-26 at 11.29.35 AM.png (907×1 px, 166 KB)

Do you have any more error details or a stack trace (maybe from the error log)?

  • Entirely unset mysql.host
  • Configure a master and a replica in cluster.databases
  • Go to /config/database/

That page eventually ends up asking for the configuration provider and looking up mysql.host. Did I miss something in the documentation where I was supposed to change the configuration provider? I see that there is a cluster config provider now...

Ah! I got a repro.

I misread and assumed you meant ConfigClusterDatabase Servers but you actually meant ConfigDatabaseDatabase Status. That's not expected, but likely an easy fix.

epriestley triaged this task as Normal priority.
epriestley added projects: Clusters, Database.

Should be fixed in HEAD of master. Thanks for the report!

This was just the page not looking up credentials in a proper, modern, cluster-aware way, and coincidentally looking them up in a way that continued working in my local test environment. If bin/storage adjust reports all-clear, that's the same information with proper credential sourcing even before this patch.

In particular, you don't need to adjust mysql.configuration-provider (and I plan to remove that option soon), and likely didn't miss anything in setup.