Jump to content

Connecting using IP


dcace

Recommended Posts

Hi,

Hope this is the correct place to post this.

 

When I run a php script (that I've used before) to connect to a local mysql database using 'localhost' it works fine. But if I try connecting using the servers own IP it won't work. It also won't connect to an external mysql database using an IP. Now with my other servers I've never had this problem so they must be set to allow connection by IP. But I didn't set those servers up so I don't know what setting I need to change. All I know is that they haven't been set to allow specific IPs to connect to them, but any. I've posted the mysql details from phpinfo below. Any help would be greatly appreciated.

 

mysql

MySQL Supportenabled

Active Persistent Links0

Active Links0

Client API version5.0.77

MYSQL_MODULE_TYPEexternal

MYSQL_SOCKET/var/lib/mysql/mysql.sock

MYSQL_INCLUDE-I/usr/include/mysql

MYSQL_LIBS-L/usr/lib/mysql -lmysqlclient

 

 

DirectiveLocal ValueMaster Value

mysql.allow_persistentOnOn

mysql.connect_timeout6060

mysql.default_hostno valueno value

mysql.default_passwordno valueno value

mysql.default_portno valueno value

mysql.default_socketno valueno value

mysql.default_userno valueno value

mysql.max_linksUnlimitedUnlimited

mysql.max_persistentUnlimitedUnlimited

mysql.trace_modeOffOff

Link to comment
https://forums.phpfreaks.com/topic/251881-connecting-using-ip/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.