I solved this as I was typing the support request here, so I thought I'd share it...
I created a db for a separate application running on the same server as my elgg installation. Absent-mindedly, the user I created was the same name as the user associated with the hostname_elgg db. This elicited the error "Elgg couldn't connect to the database using the given credentials."
I deleted it the new db, but still got the error. I created another db with the same offending user name but this time also the same password as that associated with the hostname_elgg db. After that, my website was magically restored! I then deleted the new db.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.