I'd appreciate any hint on how to fix this: wordpress installed, civicrm installation fails with Initialization Error code 24 DB Error: connect failed. Access denied for user 'user'@'localhost'

wordpress successfully uses the same database and user, therefore i can't figure out why access is denied for civicrm installer at some point (database has entries for civicrm, but installation is not completed. thanks

  • Hi. Could use a bit more info. If there are some civicrm tables in your DB, then clearly the DB access credentials are OK, or nothing would get written there. So it's probably something else getting in the way. What's your hosting environment?
    – Graham
    Commented Jul 29, 2022 at 16:18
  • Hi Graham, thank you. Debian bullseye with apache 2, mariadb 10.5, php 7.4, wordpress 5.7. . your comment makes sense to me, but the error message stills says "access denied".
    – golha
    Commented Jul 29, 2022 at 16:33

1 Answer 1


I'm wondering if this is due to the authentication method that is not set to native password. See https://mariadb.com/kb/en/authentication-plugin-unix-socket/

Try this:

  • Thank you very much, it might have been that. I changed the passwort by another method and it does work now.
    – golha
    Commented Aug 4, 2022 at 14:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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