php - How to fix Connection failed: Access denied for user 'webroot'@'localhost' (using password: YES)
I have tried to connect to local mysql by php5.6 on Ubuntu 20. First time I have tried to use root user, but it not worked. So I am using other user. I am sure that password, host, and user name is true. When I installed mysql, I ran mysql_secure_installation.
$servername = "localhost";
$username = "webroot";
$password = "xxxxxxx";
// Create connection
$conn = mysqli_connect($servername, $username, $password);
mysql.user table is like this:
+
I should work. Even root@localhost user. How could I fix this?