Daily Weekly Monthly

Daily Shaarli

All links of one day in a single page.

March 20, 2018

Phabricator & MySQL Permissions (Example)

Setting Up New Permissions

The new permissions structure is simple. Instead of creating a new permission GRANT for every database, we are just going to GRANT the user basic access to the namespace. MySQL has two wildcard characters: and %. If you need them to be interpreted literally, just escape them with . The following command will grant the necessary permissions to the MySQL user to access and update all the databases in the phabricator namespace.

GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE, SHOW VIEW ON `phabricator\_%`.* TO 'phabric'@'localhost';

Great, now whenever a new Phabricator upgrade comes along that changes the database structure, there shouldn't be much that needs to be done in terms of granting and deleting permissions.