Authentication error when connecting to MySQL in dotConnect Universal

Authentication error when connecting to MySQL in dotConnect Universal

Postby desslock43 » Wed 14 Jan 2015 21:57

Hey guys,

This may simply be an EBKAC (Error between keyboard and chair) issue, but I'm hoping someone can point me in the right direction?

I've written a self-hosted WCF service using dotConnect Universal Trial to connect to a MySQL database (I may switch databases later). Everything seems to work just fine on my local development machine. However, when I copy the console service application over to a different test machine and start the service, I receive the following exception:

Can't connect to MySQL server on 'localhost' (10061): Authentication failed. See server logs for more details.


The MySQL database service is running and listening on port 3566 (non-standard port). The server is actually an embedded database server within another application. I'm adding to its functionality through my own schema. I can make a connection to it without a problem (either on that machine or from my development machine) using MySQL Workbench using the exact same settings and credentials. My UniConnection connection string to the database is:

Code: Select all
Provider=MySQL;direct=true;host=localhost;port=3566;user=test;password=test


I followed all the deployment instructions in the Universal help file:

1) I used the licensing wizard to include the licenses.licx resource in my project.
2) I added the DbProviderFactories section to my App.Config and updated the version to the correct version.
3) I rebuilt my project. It still works on my local machine.
4) I copied over the service files, as well as Devart.Data.dll, Devart.Data.Universal.dll, and Devart.Data.Universal.MySql.dll

However, when I run the console app, I get the above error when I try to access the service's webpage. It says to check the server logs, but there's nothing in MySQL's server logs saying it even tried to connect.

At this point, I'm only deploying in a test environment. Of course, I'd use a full version in production; but I'm confused as to why I can't connect to the server from dotConnect Universal when I can connect via MySQL Workbench.

Any ideas??

Thanks!

-John
desslock43
 
Posts: 3
Joined: Wed 04 Aug 2010 20:46

Re: Authentication error when connecting to MySQL in dotConnect Universal

Postby Pinturiccio » Fri 16 Jan 2015 16:27

desslock43 wrote:Can't connect to MySQL server on 'localhost' (10061): Authentication failed. See server logs for more details.

According to the error, you are trying to establish a connection with the server on the same computer, listening to the port 3566. However, the authentication error occurs. Probably you have specified incorrect login/password.

desslock43 wrote:The server is actually an embedded database server within another application.

Please describe what you mean by "embedded database server" in more details.
Pinturiccio
Devart Team
 
Posts: 1982
Joined: Wed 02 Nov 2011 09:44

Re: Authentication error when connecting to MySQL in dotConnect Universal

Postby desslock43 » Fri 16 Jan 2015 20:01

Thanks for getting back to me!

According to the error, you are trying to establish a connection with the server on the same computer, listening to the port 3566. However, the authentication error occurs. Probably you have specified incorrect login/password.


Nope, I've checked the username and password and they are correct. In fact, when I open MySQL Workbench on that same machine, I can successfully make a connection to "localhost" at port 3566 using the same username and password as I'm using with dotConnect Universal. MySQL Workbench connects successfully, but dotConnect Universal doesn't. According to MySQL Workbench, no SSL or SSH connection options are enabled on the server: it should simply be a basic connection.

desslock43 wrote:
The server is actually an embedded database server within another application.

Please describe what you mean by "embedded database server" in more details.


Sure. The machine in question already has a internally-developed server application installed on it. That server application launches its own embedded MySQL database service (mysqld.exe) for its internal database, listening on port 3566. I'm trying to connect to that database server to add additional functionality using dotConnect Universal in my application. MySQL Workbench can connect just fine to that listener; however, dotConnect receives the authentication error listed above; and both connections are made using the same username, password, host name, and port.

Any other thoughts as to why I might be running into this issue?

Thanks again for your help on this!

-John
desslock43
 
Posts: 3
Joined: Wed 04 Aug 2010 20:46

Re: Authentication error when connecting to MySQL in dotConnect Universal

Postby Pinturiccio » Thu 22 Jan 2015 15:56

desslock43 wrote:Can't connect to MySQL server on 'localhost' (10061): Authentication failed. See server logs for more details.

This error means that dotConnect Universal has found a MySQL server by the address localhost:3566, but the connection was not established. The server returned the error "Authentication failed."

desslock43 wrote:MySQL Workbench can connect just fine to that listener;

Please provide us connection string that you use in MySQL Workbench.

Please also try connecting to the database with another provider, for example, MySQL Connector/Net. Try using the following connection string with MySQL Connector/Net:
Code: Select all
Server=localhost;Port=3566;Uid=test;Pwd=test
Pinturiccio
Devart Team
 
Posts: 1982
Joined: Wed 02 Nov 2011 09:44


Return to dotConnect Universal