Link to home
Start Free TrialLog in
Avatar of stuengelman
stuengelmanFlag for United States of America

asked on

Using VS 2008 With MySQL Version 5.5.19.0

Hello,

I have installed MySQL on my server using the MySQL Installer version 5.5.19.0.  This version of MySQL operates in the .NET 4.0 Framework, which has also been installed on the server.

I am authoring an application using Visual Studio 2008 (VB.NET), which can only accomodate .NET up to version 3.5.

My question is: if I compile a program, using the .NET 3.5 Framework, and the .NET 3.5 MySQL Connector, will it be able to access the 5.5.19.0 version of MySQL (basically just need table record query, read, write, and delete functionality)?

The .NET 3.5 Framework is also installed on the server.

Thanks, Stu Engelman
ASKER CERTIFIED SOLUTION
Avatar of jimmycdinata
jimmycdinata
Flag of Indonesia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of stuengelman

ASKER

Hi Jimmy,

Just to be clear, you are saying that a pre .NET 4.0 Framework MySQL Connector will be able to connect to a .NET 4.0 Framework version of MySQL?  Is that correct?

Thanks, Stu
Avatar of Nasir Razzaq
I think best way of finding this out is to try it.
Hi Code Cruiser,

Will give it a try.

Thanks, Stu
Hello,

I gave  it a try, using an old version of the MySQL.NET connecter, and the code crashed because it couldn't establish a connection.  The operant code is in the snippet.  The crash occurs on the CN.Open() statement.

Two issues:

(1) After running the MySQL installer on the server, it appears from MySQL Workbench that two instances of MySQL were created, one called "Local instance MySQL Server", and one called "Local instance MySQL55".  Does my connection string need anything extra to point to the MySQL55 instance (that's where the database is)?

(2) Is there a way to ensure that my "root" user has remote access permission (my code is resident on my PC, not the server)?

Thanks, Stu
Dim CN As New MySqlConnection
Dim CMD As New MySqlCommand
CN.ConnectionString = "Server=74.208.70.67;Port=3307;Database=test;Uid=root;Pwd=XXXXXXXX;"
CN.Open()

Open in new window

Hello,

This is pursuant to my last post.  I opened MySQL Workbench on the server, and created remote access permission for the "root" user to the MySQL55 instance from all remote locations, and also granted all schema priveleges,

I reran the code, and got the same error again ("Unable to connect to any of the specified MySQL hosts").

At this point, I can think of two options, although one of you may have some others:

(1) Make some change to my connection string so that the MySQL55 instance is being properly targeted (I thought it would be, as I used port 3307, and the default instance listens on port 3306).

(2) Scrap using the .NET version of MySQL Connector entirely, install and register the MySQL COM Connector for the version of MySQL I'm using (assuming one is provided for this version of the MySQL runtime engine), and instantiate it in code using the CREATEOBJECT method (i.e., program against the DB in ASP Classic style).

Comments please.

Thanks, Stu
Hi CC,

The MySQL installer automatically assigned ports to the two runtime instances that were created.  You'll notice in my connection string in my 12/19/11 06:35 AM post that I specified port 3307 (this is where my test DB is).

Stu
Hello all,

I'm really getting stumped here.  I installed the latest MySQL ODBC driver, and tried the code in the snippet.

I'm still getting the "can't connect" error on the line CN.Open().

A possible issue is that the ADODB library (MS version 2.8) is too old to interface with the 5.1 version of the MySQL ODBC Connector.

Stu
Dim CN As New ADODB.Connection()
CN.ConnectionString = "Driver={MySQL ODBC 5.1 Driver};Server=74.208.70.67;Port=3307;Database=test;User=myUsername;Password=KD08e0fSw;Option=3;"
CN.Open()

Open in new window

I don't know if this will help or not, but I've unblocked port 3307 in Windows Firewall at both my PC and the server, but to no avail.

Also, I don't know if this has any importance for the connection string, but the port 3306 instance of MySQL Server (which I cannot even access within MySQl Workbench at the server) has a Windows Firewall Profile of "Public".  The port 3307 instance, which I can create DB's and tables in, has two Windows Firewall Profiles, one called "Domain" and one called "Private". I did configure Windows Firewall at the server to allow inbound remote traffic at port 3307, but this did not help.

I'm particularly concerened about the "Domain" profile status of the MySQL55 runtime instance; I'm wondering whether the domain name (MySQL55) needs to be explicitly stated somewhere in the connectionn string.
Hello all,

At this point I've given up on the .NET Framework 4.0 version of MySQL, and uninstalled it.

I am now trying to install an earlier version of MySQL.

I am getting an error because the older MySQL installer thinks an instance named "MySQL" is already running.  I cheked Windows Services, and it in fact was still there after the uninstall.  I tried removing it using Windows Power Shell via the command sc.exe delete "MySQL".  Power Shell came back saying "Success", but my Services console still has the service listed, and I still get the error when I try to resume the install of the older version of MySQL.

Can anyone tell me how to delete my old MySQL service from Windows?  My guess is that it's really just a "pointer" to something that isn't there any more, as I already uninstalled the NET Framework 4.0 version of MySQL.  But just having this pointer in Windows Services prevents the older MySQL installer from completing.

Thanks, Stu
Hello Again,

I was able to remove the original service pointer by manually editing out the keyset using RegEdit.

Now I have a new problem.  My installer (mysql-essential-5.1.49-win32.msi) hangs with the following diagnostics:

Problem signature:
  Problem Event Name:      AppHangXProcB1
  Application Name:      MySQLInstanceConfig.exe
  Application Version:      1.0.16.0
  Application Timestamp:      2a425e19
  Hang Signature:      8c79
  Hang Type:      32
  Waiting on Application Name:      rdpclip.exe
  Waiting on Application Version:      0.0.0.0
  OS Version:      6.1.7601.2.1.0.1296.17
  Locale ID:      1033
  Additional Hang Signature 1:      8c791fd4369c9964c9d184083c961785
  Additional Hang Signature 2:      7b31
  Additional Hang Signature 3:      7b31b446f3751f234d658fe6035b3c40
  Additional Hang Signature 4:      8c79
  Additional Hang Signature 5:      8c791fd4369c9964c9d184083c961785
  Additional Hang Signature 6:      7b31
  Additional Hang Signature 7:      7b31b446f3751f234d658fe6035b3c40

Any ideas?

Thanks, Stu
I shut rdpclip.exe down, and managed to get through all but the final step, which is configuring security.  It looks like I have a blocked port.  It's open in Windows Firewall, but I crash when I try to open my hosting manager (Plesk), which also has a firewall.  I set up a ticket at the host.
Thank you, and sorry for the long delay in closing this.  Stu