# Calling MYSQL from a different IP address?

**URL:** <https://forum.kirupa.com/t/calling-mysql-from-a-different-ip-address/294397>\
**Category:** programming\
**Created:** [August 13, 2009, 1:23pm UTC](https://forum.kirupa.com/t/calling-mysql-from-a-different-ip-address/294397 "2009-08-13T13:23:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Snivvle](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@Snivvle](https://forum.kirupa.com/u/Snivvle)\
**Post date:** [August 13, 2009, 1:23pm UTC](https://forum.kirupa.com/t/calling-mysql-from-a-different-ip-address/294397/1 "2009-08-13T13:23:23Z")

</div>

Hi,

If a PHP program is created to be hosted on multiple websites, and those websites don’t have any kind of database, how would the program talk to a MYSQL database which is hosted on an entirely different backbone / ip / etc?

The default is ‘localhost:3306’. So would I change this to\*\* [mywebsite.com](http://mywebsite.com):port#\*\*?  
Even if I were to do that, I would probably have to allow for certain PHP files to be accessed by outside sources, which could be a security threat? (another topic).

Thanks!
