I have database on some sever and now i want to use this database from another server where my PHP files are hosted.
I added a % host, I crated a user on my database server to access this database via C-Panel, this connection works on server itself if i use in php and also works on my local system.[ I can access this database from my local system but not from another live server]
i am using following connection strings to access database:
1. mysql_connect([IP-database server],[USER-ID],[PASS]);
2. mysql_connect([IP-database server:3306],[USER-ID],[PASS]); i use port number along with ip like 193.189.75.113:3306
3. mysql_connect([server-name],[USER-ID],[PASS]); i used server name instead of using ip
4. mysql_connect([server-name:3306],[USER-ID],[PASS]); i used server name with Port number 3306 instead of using ip
Please note that 1 and 2 works on local
I request you to help me sorting this issue.
I shall be thankful to you.
Regards
I added a % host, I crated a user on my database server to access this database via C-Panel, this connection works on server itself if i use in php and also works on my local system.[ I can access this database from my local system but not from another live server]
i am using following connection strings to access database:
1. mysql_connect([IP-database server],[USER-ID],[PASS]);
2. mysql_connect([IP-database server:3306],[USER-ID],[PASS]); i use port number along with ip like 193.189.75.113:3306
3. mysql_connect([server-name],[USER-ID],[PASS]); i used server name instead of using ip
4. mysql_connect([server-name:3306],[USER-ID],[PASS]); i used server name with Port number 3306 instead of using ip
Please note that 1 and 2 works on local
I request you to help me sorting this issue.
I shall be thankful to you.
Regards
Comment