Page MenuHomePhabricator

Pass through MySQL commands via bin/storage
Closed, InvalidPublic

Description

We would like to automate queries on the Phabricator database in order to track some statistics - for example, the average size of emails being sent out. To make this easier to script, we want to be able to control the way MySQL returns its output - for example, by using the -N flag. We have multiple MySQL machines running, and while we could normally do this with a mysql command, it would be nice if we could use the configuration and authentication that Phabricator already uses in ./bin/storage so that changing the database Phabricator is pointing to doesn't change how the script runs.

It would be great if we could pass through MySQL flags through ./bin/storage shell to faciliate automated queries.

Event Timeline

epriestley added a subscriber: epriestley.

"Wait for T12681, then pay us a lot of money." See also T12778.

Would you be adverse to accepting a patch that does this?

Yes. (That is, I'm adverse to upstreaming this.)

Noted, OK. We'll proceed by adding our own local ./bin/storage endpoint for it.