I have probably an incredible stupid question...
I have the following code, it should work. All credentials are working, I tested them with a different script. But, I cant see where the code is wrong...
Could someone be so kind to help me in finding the problem, so I can understand it better?
define("HOST", "localhost"); // The host you want to connect to.
define("USER", "deb63058_DomiSec"); // The database username.
define("PASSWORD", "ypPN7UY6aaxLxw7D6qwTrkJ3"); // The database password.
define("DATABASE", "deb63058_Domi"); // The database name.
$mysqli = new mysqli(HOST, USER, PASSWORD, DATABASE) ;
// If you are connecting via TCP/IP rather than a UNIX socket remember to add the port number as a parameter.
$con=mysqli_connect("localhost","deb63058_DomiSec","ypPN7UY6aaxLxw7D6qwTrkJ3","deb63058_Domi");
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL !!!: " . mysqli_connect_error();
}
Give's the following error:
Failed to connect to MySQL !!!: Access denied for user 'deb63058_DomiSec'@'%' to database 'deb63058_Domi'
What does '@'%' mean in the error message? I connect to a local turnkey linux server
Access denied for useris a simple username/password error message - check your username and password. Normally that would say : Denied for user 'deb63058_DomiSec'@'localhost' though. ... I hope none of those connection details are really, real though (on a public website like SO)mysql.userandmysql.tables_privtables to ensure that your user has access rights to thedeb63058_Domitable