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 > How to connect to mySQL database stored on different computer?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-04-06, 13:05
uraknai uraknai is offline
Registered User
 
Join Date: Mar 2006
Posts: 41
How to connect to mySQL database stored on different computer?

Hi,

I have 2 pc's both running Windows XP and with mySQL 5.0 installed. What I need is to be able to access a database stored on one pc from the other pc. Could someone give me a step by step guide on how to acheive this.


Thanks
Reply With Quote
  #2 (permalink)  
Old 08-04-06, 18:51
dbmab dbmab is offline
Registered User
 
Join Date: Apr 2006
Location: Denver, Co. USA
Posts: 240
Assuming these are networked together, basically, you would enter the IP address of the computer you want to connect to. It would be best if the computer had a fixed/static IP address.

For example, if you are using the MySQL Administrator program or Query Browser, you would enter the IP address as the "Server Host:" when you log in.

If you are using PHP, replace xxx.xxx.xxx.xxx in the following with the IP address of the computer you want to connect to -
PHP Code:
$link mysql_connect('xxx.xxx.xxx.xxx''mysql_user''mysql_password')
    or die(
'Could not connect: ' mysql_error()); 
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