Issue #2057213 by Liam McDermott - Use better SQL GRANT style.
Fix permissions.
Add some debugging in the websh wrapper.
Prepare websh wrapper for drush aliases.