Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Can you access mysql from the command line?

    mysql -u DB_USER -pDB_PASS -h DB_HOST DB_NAME

    making the appropriate substitutions from the values in wp-config.php?

    Did you set up the user correctly?

    grant all on DB_HOST.* to 'DB_NAME'@'DB_HOST" identified by 'DB_PASS'

    Dion

    (@diondesigns)

    Make sure you have the following line in your my.cnf file:

    default_authentication_plugin = mysql_native_password

    WordPress (actually PHP when using mysqlnd) is incompatible with MySQL 8 unless the line is present.

    Thread Starter lo0seun1t

    (@lo0seun1t)

    Dion Design, if I could give you some money for this I would thank you thank you thank you!!!. This has been doing my head in for the last three days. The only thing I would add is I needed to add [mysqld] at the beginning the my.cnf file. May you live long and prosper!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error establishing a database connection’ is closed to new replies.