Error 1042 - Unable to connect to any of the specified MySQL hosts
Posted by: Gustavo Martín
Date: November 23, 2011 12:52PM

Hi you all.

I'm having a problem with my own app developed in VB.net 2010. First of all I'm going to give you my configuration to make you an idea of what I'm talking about.

OS: WindowsXP Pro SP3
MySQL Server: 5.5
Connector .NET: 6.4.4

First of all I configured file my.ini to accept remote connetions by adding the line bind-address=0.0.0.0 and I erased line that says skip-networking.

When I run my app localy, I login as root user and everything works fine. The problem came when I tried to remotely access to MySQL. I login as root user and everything works fine until the vb code executes the following:

DbGCATPacientes_PersonalespacientesTableAdapter.Fill(DbGCATPacientes_Personales.pacientes)

This line raises the Error 1042 - Unable to connect to any of the specified MySQL hosts

So I access the server via command line. I login without any problem and type in show proccesslist; to see the connections. There is a connection for the app. Grants for user root are all for *.* and for the database I created in mysql. And I also have a user 'root'@'%' with all privileges to ensure that remote hosts can access the database.

Where can be the problem? I don't understand, if I can login mysql without any problem, why or what raises this error and just for remote connection?

Thanks and waitting for an answer,
Gustavo

Options: ReplyQuote


Subject
Written By
Posted
Error 1042 - Unable to connect to any of the specified MySQL hosts
November 23, 2011 12:52PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.