• Resolved jredmond

    (@jredmond)


    Localhost install on MacOS Catalina (mac mini 2012) running Mac Apache & PHP 7.3.22 + Homebrew MySQL 8.0.21
    Apache is running, MySQL is running (I have accessed via command line and checked my username, password, and Privileges). I have confirmed that wp-config.php contains the same info as the database itself reports. (which is the only clue given on the error page)
    Yet I STILL get “error establishing database connection” when trying to install.
    ps-ef | grep mysql shows mysql reporting its hostname as something odd that includes both the mac machine name plus the network or router name. Don’t know if that could be a clue?

    Any help would be appreciated

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @jredmond,

    Could you please share the details of the error page or any error logs you might have?

    In your wp-config.php file, is your DB_HOST set to localhost or the hostname reported by MySQL?

    /** MySQL hostname */
    define( 'DB_HOST', 'localhost' );
    Thread Starter jredmond

    (@jredmond)

    Thanks for your insight…. I was remiss in not reporting the solution I EVENTUALLY arrived it. Looks like there was a conflict between what PHP expected and MySQL was providing in terms of password encryption (MySQL changed and my db is a later version than my PHP) so I told MySQL to use the encryption PHP expects for the ‘wordpress’ user.

    You’re welcome. Glad it’s fixed now.

    If your question has been answered, it would be great if you would mark this topic as resolved in the sidebar. This helps the forum’s volunteers find the topics that still need attention and more people will get helped, possibly like you did.

    @jredmond Hi there. Could you please leave a trace of what you did to fix it? This might help many people, and me too, obviously.
    Thanks, ciao.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘5.5 MacOS Catalina install – error establishing database connection’ is closed to new replies.