Improve database connection setup, hopefully to fix Travis build.