Jump to content

[SOLVED] ODBC Connection to MySQL Database


peterk

Recommended Posts

Hi,

Is is possible to use this service to connect using a DSN with the MySQL ODBC driver ? This would allow a .Net or MS Access platform application to retrieve and update the database. For this to work, the application would need a server IP address, a user name and password.

 

Any help here much appreciated.

 

PeterK

Link to comment
Share on other sites

If you're running a .NET application on Johnny, you will have to use the MySQL Connector/Net adapter to connect to MySQL. If you are using an application that runs on your computer, then you should be able to configure the connector yourself.

Link to comment
Share on other sites

If you're running a .NET application on Johnny, you will have to use the MySQL Connector/Net adapter to connect to MySQL. If you are using an application that runs on your computer, then you should be able to configure the connector yourself.

 

Hi,

 

Thanks for this. I'm currently signed up to Stevie and am dealing with an application running on my computer. I've connected to MySQL hosts before by creating a DSN quoting either an IP address or a DNS Name. Will this approach work for Stevie and if not, how do I connect to Johnny ? And where do I get the server IP address ?

 

Thanks again

 

Peter Kaye

Link to comment
Share on other sites

First of all, you should be aware that .NET applications to not run on Stevie. You will only be able to run .NET applications on Johnny, where mono is installed.

 

I've connected to MySQL hosts before by creating a DSN quoting either an IP address or a DNS Name. Will this approach work for Stevie and if not, how do I connect to Johnny ? And where do I get the server IP address ?

 

The host you are looking for is stevie.heliohost.org. This approach will work as long as you are running on your application on your computer, but as mentioned before, you will need to switch to Johnny to deploy your application. Also, you will first need to enable remote MySQL access.

Link to comment
Share on other sites

Sorry but I am still having trouble.

 

I've created a database on Stevie and a MySQL user and password.

 

I have MySQL ODBC 5.1 successfully installed on a pc ( i.e I can connect to other MySQL DB's)

 

I've set up a DSN with

Server Name : helio.host.org (is this correct - before I've used IP address ??)

 

User Name : The MySQL user name I've created

Password : The MySQL password for this user

 

But I get message - "cannot connect to server on helio.host.org." (10060)

 

Please can you tell me what I'm going wrong.

 

Thanks

 

Peter

 

I've spotted some possible sillies in my earlier post..

 

Server should perhaps be stevie.heliohost.org

Port should be 2082 - port used in the phmyadmin connection

 

Now I get the message...

 

Lost connection to MySQL server at 'reading initial communication packet' , System error:2

 

Although this looks more hopeful - something is obviously still wrong. Am I correct to use port 2082 ?

 

Peter

Link to comment
Share on other sites

Have you done this: http://wiki.helionet.org/Mysql#Connecting_Remotely

 

Connecting Remotely

 

Step 1: Login to your cpanel

 

Go to your cpanel.

Step 2: Click on remote Mysql

 

Click remote MySQL

Step 3: Adjust Settings

 

Put a percent sign in the box and click submit.

Step 4: Connect

 

Use the host stevie.heliohost.org

And 2082 is the port for cPanel. MySQL is port 3306.

Link to comment
Share on other sites

Hi,

I followed your suggestion - inserted % in the remote urls box - but the ODBC problem remains. I still get the System Error 2. Could this be a firewall issue at the server end - I worked with a MySQL db once where the firewall had to be opened for the IP address used in the ODBC connection.

 

Has anyone successfully connected to stevie by ODBC ?

 

Peter

Link to comment
Share on other sites

It is 2082, the port that phpMyAdmin uses, that seems to get me closest - its obviously seeing the DB and trying to connect. This is the port that gives Error2.

 

With 3306, the normal ODBC MySQL port , I get the message that access is denied....

 

"Connection Failed [HY000][MySQL ODBC 5.1 Driver] Access denied for user peter606_rupert'@'nn.nn.nn.nn.dsl.pipex.com' ( using passwords :YES)

 

where nn.nn.nn.nn = my client ip address

 

Does this means that 3306 is firewall protected ?

 

Hope this helps.

 

Peter.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...