contactskn 2 Report post Posted July 11, 2009 Dear friends I am developing a website for my client and its hosted on manashosting and to connect to the mysql I am using the following code <?php/// For the following details,/// please contact your server vendor$hostname='localhost'; //// specify host, i.e. 'localhost'$user='abc'; //// specify username$pass='cham'; //// specify password$dbase='vomp'; //// specify database name$connection = mysql_connect("$hostname" , "$user" , "$pass") or die ("Can't connect to MySQL");$db = mysql_select_db($dbase , $connection) or die ("Can't select database.");?> But I am not able to connect to the Mysql and getting the message "Can't connect to MySQL"I am not able to understand what is the reason. Is there anybody to help me for the above said problem with my clients host manashost . There customer service is also very poor. And they are also not helping me. I think the hosting facility over there is not good. Thats why always I appreciate Xisto as it is the best. Thank you all in advance. Please do help me. Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted July 11, 2009 Confirm that the User name does not require a Prefix, like here at the Xisto.Also, of course, double check the user name and password. and check that the User has been created via phpmyadmin or the Mysql wizards.Another thing to check/confirm is the "host" name is not always 'localhost'. Some Servers use another name for their Host. Share this post Link to post Share on other sites