Quote:
Originally Posted by jonaskellens
Hello
I get error : Access denied for user 'MyUser'@'localhost' (using password: YES)
But what I find strange is where this "localhost" comes from ?
My code :
Code:
$logdb=mysqli_connect("11.22.33.44", "MyUser", "MyPasswd", 'logging');
if (mysqli_connect_errno()) {
echo "MySQLi conn err: " . mysqli_connect_error();
}
|
You need to be a bit more clear about where you are connecting to and from.
Is 11.22.33.44 a remote host or the same machine your PHP code is running on?
Is the user table data from the remote machine or the local machine (or are they the same machine)?
There is an apparent error in the user table data, higlighted below...
Quote:
Originally Posted by jonaskellens
My Users :
Code:
MySQL [(none)]> select Host, User from mysql.user;
+----------------+--------------+
| Host | User |
+----------------+--------------+
| % | scripter |
| % | jonaskellens |
| % | root |
| 11.22.33.440 | MyUser |
| localhost | mysql.sys |
+----------------+--------------+
|