T-Bird Posted April 21, 2009 Share Posted April 21, 2009 Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'MyExternalIP' (10060) in C:\wamp\www\smith\MySQLTEST.php on line 2 I have a site, hosted on my bluehost account which I would like to have reference the database on my local server. Please note the database is not on the remote site, the one hosted by bluehost, that the end-user connects too. I am logging in with a user account that accepts any host (host is set to %). It wasn't working so I made a streamlined file that contains only the necessary code for testing, and this also does not work. <?php $con = mysql_connect('MyExternalIP','UserName','Password'); mysql_error($con); ?> My routers ports are opened correctly, as proven by canyouseeme.org. I'm currently under the default WAMP configuration except I changed Apache to port 880 - I doubt that makes a difference here. Is there a setting I have to have turned on locally in order to allow external connections? Is there a setting I have to have my webhost turn on in order to allow retrieval from external databases? Quote Link to comment https://forums.phpfreaks.com/topic/154979-solved-error-10060/ Share on other sites More sharing options...
fenway Posted April 21, 2009 Share Posted April 21, 2009 Have you read the sticky in the chlid board? Quote Link to comment https://forums.phpfreaks.com/topic/154979-solved-error-10060/#findComment-815875 Share on other sites More sharing options...
T-Bird Posted April 22, 2009 Author Share Posted April 22, 2009 Which sticky, the one about php not being able to find the function? Or did I look at the wrong sticky? At any rate, I'm convinced that it must be a configuration error as I'm using WAMP, and have very little idea of how to configure MySQL. I originally had this problem on another computer running WAMP at the office, decided to see if I get the same problem on my home machine - I do. So far as I can tell they are running under the same - seemingly faulty - configuration. One difference is that the office computer was returning a MySQL error 111. Since I think it may be a configuration error, if it helps, here are all the uncommented lines of my my.ini file [client] port = 3306 socket = /tmp/mysql.sock [wampmysqld] port = 3306 socket = /tmp/mysql.sock skip-locking key_buffer = 16M max_allowed_packet = 1M table_cache = 64 sort_buffer_size = 512K net_buffer_length = 8K read_buffer_size = 256K read_rnd_buffer_size = 512K myisam_sort_buffer_size = 8M basedir=c:/wamp/bin/mysql/mysql5.1.33 log-error=c:/wamp/logs/mysql.log datadir=c:/wamp/bin/mysql/mysql5.1.33/data skip-federated log-bin=mysql-bin binlog_format=mixed server-id = 1 [mysqldump] quick max_allowed_packet = 16M [mysql] no-auto-rehash [isamchk] key_buffer = 20M sort_buffer_size = 20M read_buffer = 2M write_buffer = 2M [myisamchk] key_buffer = 20M sort_buffer_size = 20M read_buffer = 2M write_buffer = 2M [mysqlhotcopy] interactive-timeout [mysqld] port=3306 I'm using MySQL version 5.1. Quote Link to comment https://forums.phpfreaks.com/topic/154979-solved-error-10060/#findComment-816132 Share on other sites More sharing options...
T-Bird Posted April 22, 2009 Author Share Posted April 22, 2009 GAH!!!! I knew it was something stupid. Sorry all. I'm running the server on WAMP under windows XP Home (not an ideal situation, but it's temporary) and while I opened up my router, I forgot to unblock the port on my software firewall! Thx for the help. Quote Link to comment https://forums.phpfreaks.com/topic/154979-solved-error-10060/#findComment-816135 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.