Northern Flame Posted July 14, 2007 Share Posted July 14, 2007 This isn't my first time working with MySQL, but for some reason I can't connect to it, am I doing this wrong? <?php $dbhost = "host"; $dbuser = "user"; $dbpass = "pass"; $dbname = "name"; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ("Error connecting to mysql"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/59989-solved-cant-connect/ Share on other sites More sharing options...
AndyB Posted July 14, 2007 Share Posted July 14, 2007 So far so good. The values you're using for the connection variables may be wrong. die(mysql_error()) would be more helpful in determining the problem. Quote Link to comment https://forums.phpfreaks.com/topic/59989-solved-cant-connect/#findComment-298358 Share on other sites More sharing options...
Northern Flame Posted July 14, 2007 Author Share Posted July 14, 2007 alright let me try that Quote Link to comment https://forums.phpfreaks.com/topic/59989-solved-cant-connect/#findComment-298359 Share on other sites More sharing options...
Northern Flame Posted July 14, 2007 Author Share Posted July 14, 2007 I keep getting an error message Warning: mysql_connect(): Can't connect to MySQL server on 'p50mysql11.secureserver.net' (4) in mydomain.com/var/tables.php on line 7 Can't connect to MySQL server on 'p50mysql11.secureserver.net' (4) Quote Link to comment https://forums.phpfreaks.com/topic/59989-solved-cant-connect/#findComment-298363 Share on other sites More sharing options...
AndyB Posted July 14, 2007 Share Posted July 14, 2007 I'd guess that the sql server is down. Quote Link to comment https://forums.phpfreaks.com/topic/59989-solved-cant-connect/#findComment-298366 Share on other sites More sharing options...
Northern Flame Posted July 14, 2007 Author Share Posted July 14, 2007 alright I'll check with the host Quote Link to comment https://forums.phpfreaks.com/topic/59989-solved-cant-connect/#findComment-298376 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.