Connecting Tech Pros Worldwide Forums | Help | Site Map

How you connect to mySQL Server using PHP

Newbie
 
Join Date: Oct 2009
Location: Sri Lanka
Posts: 1
#1: Oct 13 '09
How you connect to mySQL Server using PHP:


we have a mySQL server in one host,say, 192.168.1.100
I am trying a program from 192.168.1.200,
How do I make use of the databases in the mySQL Server?

thanks
Ma

TheServant's Avatar
Expert
 
Join Date: Feb 2008
Location: Australia
Posts: 919
#2: Oct 13 '09

re: How you connect to mySQL Server using PHP


Welcome to Bytes.
Have you tried mysql_connect():
Expand|Select|Wrap|Line Numbers
  1. mysql_connect( '192.168.1.100', 'mysql_user', 'mysql_password' ) or die(mysql_error);
Reply