php - How Can I access Database From One server -


i have website abc runing on 1 server online , , have library inventry system 'xyz' in php runing on server have static ip 203.215.166.77, question how can access database abc xyz in php

mysqli

$mysqli = new mysqli('10.0.0.1', 'user', 'password', 'db', 'port ( imporant external connection '); 

mysql

$link = mysql_connect('10.0.0.1:port', 'user', 'password'); 

you need open port database other server. can in firewall ( default port 3306 )


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -