nilan Posted March 21, 2007 Share Posted March 21, 2007 I have a problem in connecting to a remote mysql server using php mysql_pconnect function. The error message says that “Can't connect to MySQL server on ‘XXXXXXXX’ (10050)”. I am in a windows network which is behind a Firewall. But I can connect this same mysql server from perl (DBI-DBD-mysql) and MySqlYog via 3306 port, so it doesn’t seem a firewall blocking. If some one can give me a solution it will be a great help for me. ??? Link to comment https://forums.phpfreaks.com/topic/43640-php-mysql_pconnect-issue/ Share on other sites More sharing options...
skali Posted March 21, 2007 Share Posted March 21, 2007 Code ?? Link to comment https://forums.phpfreaks.com/topic/43640-php-mysql_pconnect-issue/#findComment-211873 Share on other sites More sharing options...
nilan Posted March 21, 2007 Author Share Posted March 21, 2007 Hi skali, Here is my code to connect to mysql server mysql_pconnect($server, $user,$password) or die (mysql_error()."/".mysql_errno()); Thanks Link to comment https://forums.phpfreaks.com/topic/43640-php-mysql_pconnect-issue/#findComment-211877 Share on other sites More sharing options...
skali Posted March 21, 2007 Share Posted March 21, 2007 Check 1- In $server are your providing only the servername? or servername:port. 2- What port your mysql is running by default it is 3306 3- try replacing hostname if you are using with IP of mysql server 4- Is Mysql working 5- try running mysql_connect() Hope it helps you. Link to comment https://forums.phpfreaks.com/topic/43640-php-mysql_pconnect-issue/#findComment-211880 Share on other sites More sharing options...
nilan Posted March 21, 2007 Author Share Posted March 21, 2007 1- In $server are your providing only the servername? or servername:port. I have tried both way giving port as 3306, but didn't work 2- What port your mysql is running by default it is 3306 I can connect this server from my other applications using 3306. In php.ini the default port is 3306 3- try replacing hostname if you are using with IP of mysql server Did, got same error 4- Is Mysql working Yes, other applications are working with this server without any issue 5- try running mysql_connect() Did, got same error I appreciate your attempt on this issue Thanks Link to comment https://forums.phpfreaks.com/topic/43640-php-mysql_pconnect-issue/#findComment-211887 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.