When you make a connection to a database, you use the usual statement:
mysql_connect('localhost','USERNAME','PASSWORD');
Where localhost is the database on the same web server as the PHP script.
If you need to connect to a database that is on another server, you would replace localhost with the IP address of the server.
You can find the IP address of the database’s server by checking your eXtend Control Panel.
- Log into your eXtend Control Panel
- Click on ‘MySQL Databases’
- Scroll down to the existing databases
- Copy the IP address next to the database you require
- Paste that IP address into your mysql_connect line