iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Database Discussion Forum This is the place to find help resolving those nagging questions you have about implementing and using all kinds of databases. Need help writing a query? Need an opinion on Oracle? Post here!

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-08-2005, 05:30 PM
WebProWorld Pro
 
Join Date: May 2004
Location: .id
Posts: 103
shilmy RepRank 0
Default remote mysql database access questions

Hi All,

This seems to be a simple question, but I cannot find the answer after looking on google and yahoo search.

Most of php scripts that use mysql database use localhost as their server. If my database is on other server, can I access the database using php scripts? How?

Thanks in advance for any info.

Regards,
Sjarief
Reply With Quote
  #2 (permalink)  
Old 08-09-2005, 09:02 AM
danlefree's Avatar
WebProWorld Pro
 
Join Date: Jun 2005
Location: Seattle
Posts: 270
danlefree RepRank 4danlefree RepRank 4danlefree RepRank 4danlefree RepRank 4danlefree RepRank 4
Default

The PHP mysql_connect() command should cover everything for you - just include the domain name or IP address of your MySQL server and you're set.

Check out the PHP mysql_connect() Manual for detailed information and code samples.
__________________
Dan LeFree | Product Manager (Linux VPS Hosting) | Owner/Operator (Web development, marketing)
Reply With Quote
  #3 (permalink)  
Old 08-10-2005, 05:57 AM
node-net's Avatar
WebProWorld Member
 
Join Date: Sep 2004
Location: leicester, UK
Posts: 63
node-net RepRank 0
Default use domain or IP

Where it says 'localhost' replace it with 'www.yourcompany.com' or the 'IP address' of the MySQL host computer.

Good look.

Dreamweaver handles PHP connections well. (Although it is a bit meagre on other controls.)
__________________
Government without personal responsibility is evil--- http://www.node-net.com/
Reply With Quote
  #4 (permalink)  
Old 08-11-2005, 10:46 PM
WebProWorld Pro
 
Join Date: May 2004
Location: .id
Posts: 103
shilmy RepRank 0
Default Re: use domain or IP

Quote:
Originally Posted by node-net
Where it says 'localhost' replace it with 'www.yourcompany.com' or the 'IP address' of the MySQL host computer.

Good look.

Dreamweaver handles PHP connections well. (Although it is a bit meagre on other controls.)
Thanks, it works now...
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 11:43 AM.



Search Engine Optimization by vBSEO 3.3.0