kinggrapes Posted February 24, 2006 Posted February 24, 2006 I need to make a ODBC connection to my MySQL database hosted by TCH. I've followed the suggestions given by TCH-David here. This method is the same as I have used many times to establish a System DSN, but with one exception; in the past I've used the IP address of the MySQL server rather that my sites domain name to point to the host. When I use the domain name, I get the following error "Can't connect to MySQL server on 'www.allenton.co.nz' (10060)" I know the database is up - my site used it! I've added my PC's IP address to the Access Hosts panel in the Control Panel. What am I missing? Edited by TCH-David: Fixed link. Quote
TCH-Bruce Posted February 24, 2006 Posted February 24, 2006 Welcome to the forums kinggrapes Are you accessing it with the correct file name and user name? Filename: your-cpanelname_database-name User: your-cpanelname_database-user Also did you add the user to the database? If I am totally off base we'll have to wait for someone to correct me. The link you are pointing to brings up an error so I do not know which thread you are pointing to for reference. Edit: corrected filename and username. Don't know what I was thinking. Quote
kinggrapes Posted February 24, 2006 Author Posted February 24, 2006 Thanks Bruce I'm using the database name and user in this format database = "USN_cataloguedata" username = "USN_visitor" Where USN is the Username that I use to login to the site admin though the control pannel. The Control panel > mysql account maintenance page sample connection script says to use the username rather than the domain name. Correct? This works for the php connection script for tha site. If it is the domain name - which part of it www.allenton.co.nz allenton.co.nz I tried both to no avail. In regards to the user access, I'm using a mysql database user and pasword that's been setup, the same one that my site's php uses to connect to the database. The link was from 3rd reference in the posted reply by owatagal in this post http://www.totalchoicehosting.com/forums/i...c=20515&hl=odbc Quote
TCH-Bruce Posted February 25, 2006 Posted February 25, 2006 No you are correct it is your cpanelname and not your domain name, sorry. Quote
TweezerMan Posted February 25, 2006 Posted February 25, 2006 The database name and database username should be prefixed with your CPanel username (plus an underscore) as you described at the beginning of your post. Your domain name (allenton.co.nz) should be specified as the server to connect to. Assuming everything is running correctly on the server, the most common cause of your error is a firewall blocking the connection from your PC to the server. Quote
kinggrapes Posted February 25, 2006 Author Posted February 25, 2006 Everything's set up as you describe David. I have a router with built in firewall. I'm not sure how it is configured, but I do other have successful ODBC DSNs set up which manage to get through the router OK. Would you expect a connection to TCH servers to behave any differently? How else might we test it? Quote
TweezerMan Posted February 25, 2006 Posted February 25, 2006 No, I would not expect a database connection to a TCH server to behave differently. I just tried testing your server with telnet to see if the MySQL server is listening and responding to connection requests, and the connection failed. My TCH domain readily responds to a telnet connection on port 3306. It appears to me that something is not right on the server, and I think you should submit a ticket to Help Desk to have them investigate it. Quote
TweezerMan Posted February 25, 2006 Posted February 25, 2006 For what it's worth, I now get a response with telnet. Quote
kinggrapes Posted February 25, 2006 Author Posted February 25, 2006 Spot on - it works. Thanks guys for all your help - I was on the verge of giving up! regards John Liddle Quote
stevevan Posted February 25, 2006 Posted February 25, 2006 Welcome to the forums! Glad you got it working. Quote
TCH-Don Posted February 25, 2006 Posted February 25, 2006 Welcome to the forum, John way to go Rick. 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.