Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MythicFrost

macrumors 68040
Original poster
Mar 11, 2009
3,944
40
Australia
Hi,

I've got a website IE www.example.com thats hosted. I'm trying to connect like this:
$con = mysql_connect("www.example.com", "user*", "pass*");

* the username and password used were provided to access the website/manager, am I using the wrong host or user/name pass?

When I test it on the server, it fails and says its the wrong user/pass or host. Any thoughts?

Kind Regards
 
You may need to talk with your host as they may set things up differently. For my host, I setup a different account for MySQL connections and the host name was setup as mysql.mydomain.com that I connect to. I chose the prefix on the domain name. So essentially, login to your web host and search the support forums, FAQ, or whatever they have for you to look at and see how they do it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.