What credentials do I use with mysql_connect()?

Discussion in 'Web Design and Development' started by MythicFrost, Mar 23, 2010.

  1. MythicFrost macrumors 68040

    MythicFrost

    Joined:
    Mar 11, 2009
    Location:
    Australia
    #1
    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
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    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.
     
  3. MythicFrost thread starter macrumors 68040

    MythicFrost

    Joined:
    Mar 11, 2009
    Location:
    Australia

Share This Page