I get exactly the same error message when I attempt to repair the database, but I’ve updated the Code Snippets plugin, so I hope this will fix the issue.
I have exactly the same problem, and have been seeing the “Error Establishing a Database Connection” message for a week or two on a regular basis.