Permission problem? SELECT command denied to user

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
ryan
Posts: 4
Joined: Fri 13 Oct 2006 01:45

Permission problem? SELECT command denied to user

Post by ryan » Fri 13 Oct 2006 01:50

I am getting an error message when trying to perform a select query from server A running ASP.NET and server B running mysql. What is strange is that it mentioned username@localhost which is not the user for this database connection.

SELECT command denied to user 'username'@'localhost' for table 'tablename'

I have insured that this user has been granted all permissions on this database from any host and I have been able to run a mysql client on server A and perform the select query without an issue. This error only appears when the query is performed through the corelabs driver.

Any thoughts?

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Fri 13 Oct 2006 12:20

Where is MySQL database and where do you run SELECT query from?

ryan
Posts: 4
Joined: Fri 13 Oct 2006 01:45

Post by ryan » Fri 13 Oct 2006 12:40

Sorry I was not more specific. The query is being run from server A (ASP.NET) and the mysql server is running on server B. I am able to run 'mysql' on server A and connect to the mysql on server B using the same credentials as the ASP.NET application and perform the select query without issue. However the same query when run through the core labs driver results in a permision denied error.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Fri 13 Oct 2006 12:54

Judging from the error message, i think that you try to connect to MySQL Server on server A (localhost). Check your connection string in ASP.NET application.
What is the table mentioned as 'tablename'?

ryan
Posts: 4
Joined: Fri 13 Oct 2006 01:45

Post by ryan » Fri 13 Oct 2006 13:04

I have verified the ASP.NET application is connecting to the mysql server on B by shutting down the server and refreshing the page that generates the error. The erorr message changes from a permissions error to a 'can not connect' error. In addition on the ASP.NET server a mysql server does not run.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Fri 13 Oct 2006 15:00

What query are you trying to execute? And what is "tablename"?

ryan
Posts: 4
Joined: Fri 13 Oct 2006 01:45

Post by ryan » Sat 04 Nov 2006 20:31

I apologize for not following up sooner. We have decided to go with another solution and have no need to resolve this problem. Thanks for the assistance thus far.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Mon 06 Nov 2006 07:14

Not at all.

Post Reply