ShootingBlanks Posted September 28, 2007 Share Posted September 28, 2007 When I use this code: $link = mysql_connect($hostname_SalesRepository, 'rump888', $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)); Everything works and I get the following message: Host information: Localhost via UNIX socket But when I use THIS code: $link = mysqli_connect($hostname_SalesRepository, 'rump888', $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)); Nothing works, and I get THIS message: Connect failed: Access denied for user 'rump888'@'localhost' to database 'salesrepository' Can anyone help me out with this??? Thanks!... Quote Link to comment https://forums.phpfreaks.com/topic/71089-mysql_connect-works-but-mysqli_connect-doesnt/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.