Jump to content

Recommended Posts

Posted

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.

Posted

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.

Posted

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

Posted

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.

Posted

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?

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...