PDA

View Full Version : Moving site, but keeping datebase on different server.. How?


Fullwebservice
05-11-2005, 01:22 PM
I was making a site for my job, and i made it and uploaded it to my server, and used my own MySQL databse.

Now I'm moving the site and it's content to there domain name(and server) thats I am not hosting, but they dont have MySQL, is it possible to edit the paths so the script will still look for the datebase i have on my server,

I think it's possible, I think i need to edit the "localhost" to with something .

but i'm not sure,

any help would be great,

thanks.

NancyJ
05-11-2005, 02:00 PM
change 'localhost' to the ip of your server

Fullwebservice
05-11-2005, 02:27 PM
doesnt it matter that there are about 10 databases on the server, it should look to the database name shouldn't it ?

NancyJ
05-11-2005, 02:31 PM
you're not changing anything about the database, if you were runnning it on your host with the IP address in it would still work fine, localhost is just easier because you dont need to know the IP address but when you move it localhost is a different place, so if you change it to the ip address which is effectively the address you're connecting to by using localhost everything will work fine, the database name hasnt changed by you moving host.

Fullwebservice
05-11-2005, 02:34 PM
thanks

Fullwebservice
06-24-2005, 12:08 AM
I tried this and it didnt work

this is where the new site is http://217.114.173.147/~admin1/outlets.php and this page is where the database should work

http://www.davidstokes.com/avi/3/outlets.php this is the one on my server and if you click the links they work, if you click the links on the new page they dont work, now i did change the localhost to the IP address,

is there more then 1 area to change the IP address?

Fullwebservice
06-24-2005, 03:35 PM
i tired to login to the admin area of the script where i add and remove new dealers. and i got this error

Warning: mysql_pconnect(): Can't connect to MySQL server on '207.44.232.119' (4) in /home/admin1/domains/avi.ie/public_html/adodb/drivers/adodb-mysql.inc.php on line 354
Can't connect to MySQL server on '207.44.232.119' (4)



I checked this line and it's
$this->_connectionID = mysql_pconnect($argHostname,$argUsername,$argPassword,$this->clientFlags);

raf
06-24-2005, 11:26 PM
you also need to change the MySQL-account's (that you use inside your PHP-script to open the connection) permissions.
more info from the manual --> http://dev.mysql.com/doc/mysql/en/grant.html

Fullwebservice
06-26-2005, 12:42 PM
ummm that makes no sence to me , i didnt make the script and know anything about MySQL..

anyway to point me in the direction, cos i have no idea , even with that link.