This question already has an answer here:

The version of MySQL is 8.0.16. This is installed on an EC2 Linux and is a fresh install. I have run the mysql_secure_installation command after installation and was able to change the root password successfully and was also able to add a second user with basic privileges.

To test the connection I made a simple script:

$link = mysqli_connect($dbhost, $dbuser, $dbpass);      
    if (mysqli_connect_error() ){
        echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL;
        echo "Connection successful";

I have double checked the values of the variables and they are all correct. When I try to visit the URL it says:

Debugging errno: 2054

How to resolve this?

marked as duplicate by mustaccio, Philᵀᴹ, kevinsky, John Eisbrener, MDCCL May 13 at 19:02

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


I was able to find the answer through this thread And this is because MySQL uses an authentication plugin. You can read all the details on the forum.

  • Would be great if you added a summary of what you actually did in your case. This site serves to help not only the person asking the question but also the wider community, and we prefer the answers to stand alone. References are great and encouraged, but it's still desirable to have the gist of the solution in the answer itself, cheers. – Andriy M May 13 at 8:48

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