Ref T6710. We have two connectors: "MySQL" and "MySQLi". The latter one ("i = improved") has had straightforward support for connection timeouts for 15 months, since it just takes a parameter.
The un-improved connector needs to take a more roundabout route.
Also, improve the exception we throw when a client gets an error because they're missing a permission. This arises when you SHOW SLAVE STATUS from a client without permission to do that, for example.
The next change will update Phabricator to use this parameter properly.