Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2009
    Posts
    1

    Unanswered: Updating connection string

    Hello everyone!

    I have an issue that I was hoping to find help with from some of you gurus. I recently changed our website from it's current host (LunarPages) to GoDaddy. They are telling me that I have to update the connection string before the order page will work again.

    Is there anyone out there that is familiar with this issue and can shed some light on the situation?

    Thanks so much!

    ~Stacie G.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so what scripting language are you using?
    you need to change the database connection to point to the new server name

    if its PHP look for something like...
    PHP Code:
    $cnn=@mysql_connect($host,$username,$password) or die(echo "Mysql failed to open a connection reporting:".mysql_errno().": ".mysql_error()));
    $dbr=@mysql_select_db($databasename,$cnn) or die ($host,$username,$password) or die(echo "Mysql failed to open a the database reporting:".mysql_errno().": ".mysql_error())); 
    $host is the hostname the computer name supplied by your new host
    $username is the variable containing the user supplied by your new host
    $password is the variable containing the pasword supplied by your new host
    $databasename is the name of the db server supplied by your new host
    $cnn is the connection object returned from opening the connection

    usually there will be a php file which defiens what those values are
    eg
    $host = "myhostname";
    $username = "dlowfly";
    $password = "blah";
    $databasename "mydbname";

    you can use
    PHP Code:
    $cnn=@mysql_connect("myhostname""dlowfly","blah"); 
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •