Knight_Life Posted June 14, 2004 Posted June 14, 2004 I am developing a page that needs to access one of my DB's on TCH servers. I've tested the page while it was hosted in my TCH webspace, it worked fine. Now that I've moved it to the remote server it doesn't work. Now I know that there are several items that need to change. I've tried a bunch and the page still can not connect to the DB. In Cpanel's "Manage MySQL" I've added the "Access Host" of "%" which as I understand it should allow any remote server access the DB (yes I know this is dumb but at this point I'm just trying to get it to work, and once it does I'll close it back down to the minimum needed). And in the page itself I've changed the mysql_connect statement from "localhost" to "****" as well as "http://****" and finally "209.51.158.250" (which is the IP that TCH helpdesk gave me as the server IP). The page still can not connect to the DB. Does anyone have the name/port that I need to put into the mysql_connect statement to get the remote page to connect to the TCH DB???? Many Thanks Knight_Life Quote
TCH-Andy Posted June 14, 2004 Posted June 14, 2004 (edited) Hi, The database port number you should use for mySQL is 3306. Edited June 14, 2004 by TCH-Andy Quote
Knight_Life Posted June 14, 2004 Author Posted June 14, 2004 Andy, Just tried that, still no joy. My connect statement now reads: $K_link_id=mysql_connect ("209.51.158.250:3306", "{user}", "{pass}"); (but with the valid user and password) The error I get is: Warning: mysql_connect(): Can't connect to MySQL server on '209.51.158.250' (110) in {file} on line 3 Line 3 of the file is the connection statement above. Since you are TCH staff you can probably look at the Help Desk tickets, if so look at ticket ZKB-13948, it has my TCH account and password so you can look at the actual CPanel setup. Thanks for the help... Knight_Life Quote
TCH-Andy Posted June 14, 2004 Posted June 14, 2004 Hi, I just tested connecting to your mySQL database using the information you supplied in the ticket and here - I could connect without a problem. So I can't find any fault with the server setup. I would suggest testing with a package such as mySQL Front to see that you can connect (and that it isn't a firewall or anything preventing access). I would then check that your code is correct. Quote
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.