If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Updating connection string

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-13-09, 15:38
dlowfly dlowfly is offline
Registered User
 
Join Date: Feb 2009
Posts: 1
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.
Reply With Quote
  #2 (permalink)  
Old 02-13-09, 16:50
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,262
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 my Versys or my Tiger 800 let alone the Norton
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On