4

So suddenly I get a "Connection refused" to the MySql database on my site which is running ExpressionEngine 3.5.2 in a shared environment. Fine...

...but the stack trace, when expanded, shows the database name, user and PASSWORD!

You can the see the error message here: http://www.huntee.se/db_error.jpg

Now this error screen looks like Codeigniter or EE. Is this really possible??

How do I make sure this doesn't happen again?

Regards, Matts

  • 1
    The saving grace is that the stack trace is only shown to logged in super admins. – Jim Wyse Jun 1 '17 at 14:03
  • Ah, I was hoping for something like that. Thanks Jim! – Matts Härsing Jun 1 '17 at 17:37
1

This is a comment really, but I do not have enough rep to add comments.

Have you tried using '127.0.0.1' as the db host rather than 'localhost'?

| improve this answer | |
  • Okay, thanks greebstreebling. The site is no longer active but I’ll keep your comment in mind for future projects. What is the difference between the two in regards to how the error message is shown? Regards, Matts – Matts Härsing Dec 8 '18 at 17:58
  • Sometimes the 'mapping' between 127.0.0.1 and 'localhost' isn't available, in MAMP for instance I found that you have to use 127.0.0.1 or the server cannot find the db server to connect to it. – greebstreebling Dec 10 '18 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.