Results 1 to 3 of 3
Jan 21, 2005, 12:49 #1
- Join Date
- Dec 2001
- 0 Post(s)
- 0 Thread(s)
connecting to remote mysql db not working, always same error
I have server1 with a mysql database and working php website. I also have a new server2 with most of the php files and it should connect to mysql db on server1 to get all of its data. The new user I made for this on the mysql db has "%" as host and all needed global priveleges as far as I can tell. But its not working.
This is how I connect :
mysql_connect("22.214.171.124", "server2", "somepassword");
And I always get this error :
Warning: mysql_connect(): Can't connect to MySQL server on '126.96.36.199' (111)
Now I changed a lot of settings already, I tried different host values, new users, different priveleges, all ip's of the server or the websites on it... but always the same error. The port number is standard so should be ok too. So I assume that there's nothing wrong with the user settings or the code itself, and that the problem must be somewhere else. But I cant imagine what more that could go wrong here.... Maybe server1 is blocking all incoming connections or something like that ?
Can anyone give me some directions on how to find the problem and how I might solve it ?