// 101:101:0:50 is NOT the real ip.
There are 2 servers for this : 1 has the php scripts and the other has the mysql db. So I tried to connect to the mysql db by giving the ip.
$con=mysql_connect('101:101:0:50','news','skdgh31') or die("Cannot Connect");
But it always gave Cannot Connect.
phpMyAdmin was available at 101:101:0:50:8000 and everything worked OK.
I used MySQL front and it too connected.
Yet my scripts from this site could not connect ?
If someone here replies that the problem lies in the php then please mention what I have to look for in phpinof() ?
Please help. Thanks.
Anjanesh
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 3.23.49
Directive Local Value Master Value
mysql.allow_persistent On On
mysql.connect_timeout -1 -1
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off
If there is anything left out that needs to be present please mention. I don;t know abt this but shouln't the ip of the mysql server be present here ?
I have some problems using MySql in Windows XP Home (don't ask why WXP Home, I'm going to linux next weekend), when using php or mysqlcc I get the message [paredes_yedra] ERROR 2003: Can't connect to MySQL server on 'paredes_yedra' (10060) and I'm trying to set up MySql without network connection it was a really pain.
Check first the my.ini and uncomment the #bind-address 127.0.0.1 and it works.
Don't reinstall mysql.
When I run on my local machine connecting to the mysql db - it works. So its not a prob with the mysql db server. But when I uploaded it to the website (different ip so localhost cannot be used for connectivity) it does not connect. So connection is not the prob the script in the wesite connecting to it is.
Are you sure there are no firewall issues? Try 'telnet xxx.xxx.xxx.xxx xxxx' on your webhost (you need shell access for that), where dot-delimited Xs stand for ip and last Xs are the port number used to connect to mysql db.