Installation Error "1046 No database selected"
While it may be an unsatisfying answer, for the sake of completion, this question was resolved by completely destroying and rebuilding the exact same VM.

Short discussion on Twitter about it here:

https://twitter.com/monooso/status/487831027327696896

I have a warm affection for the on/off technique.  I've even seen it fix elevators!