Current location: Hot Scripts Forums » Programming Languages » PHP » mysql connect on diff site


mysql connect on diff site

Reply
  #1 (permalink)  
Old 06-03-04, 09:30 PM
eq1987 eq1987 is offline
Wannabe Coder
 
Join Date: Dec 2003
Posts: 216
Thanks: 0
Thanked 0 Times in 0 Posts
mysql connect on diff site

How can i connect to a database on a different site?
As in.. i have thebestsite.com, and i want theworstsite.com to connect to my database.

Isnt the connect usually localhost, user, password? Or do i change local host to something... I really dont understand it unfortuneately.
Thanks
Reply With Quote
  #2 (permalink)  
Old 06-04-04, 05:42 AM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
you can, but you need to know the port of the mysql server in thebestsite.com
like this:
PHP Code:

mysql_connect('thebestsite.com:2095'$user$pass)or

die(
mysql_error()); 
you need to know the port..
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create a php mysql site searchable from search engines? Klesti PHP 2 05-16-04 04:09 PM
Error while creating database (Errornumber 2002: "Can't connect to local MySQL server lylesback2 PHP 5 04-11-04 01:37 PM
Getting MySQL cannot connect error NCC1701 PHP 2 04-05-04 08:30 PM
Can't connect to local MySQL Abdul Script Requests 3 04-02-04 02:35 AM
I need a bit of help, with MySQL connect H-a-V-o-C_88 PHP 4 12-03-03 02:05 PM


All times are GMT -5. The time now is 10:37 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.