When I use this code:Everything works and I get the following message:Code:$link = mysql_connect($hostname_SalesRepository, '*user*', $password_SalesRepository, 'salesrepository'); /* check connection */ if (!$link) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } printf("Host information: %s\n", mysql_get_host_info($link));
Host information: Localhost via UNIX socket
But when I use THIS code:Nothing works, and I get THIS message:Code:$link = mysqli_connect($hostname_SalesRepository, '*user*', $password_SalesRepository, 'salesrepository'); /* check connection */ if (!$link) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } printf("Host information: %s\n", mysqli_get_host_info($link));
Connect failed: Access denied for user '*user*'@'localhost' to database 'salesrepository'
Can anyone help me out with this??? Thanks!...
MOD EDIT: Replaced username with *user* for security. Two pieces to the puzzle are better for stopping a potential hacker. Don't give out the username either.



Reply With Quote

Bookmarks