Bug #52294 Msql connector not working with visual studio data source wizard
Submitted: 23 Mar 2010 8:04 Modified: 25 Mar 2010 0:12
Reporter: Mo Heaven Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:6.0.5 OS:Windows (Msql connector not working with visual studio data source wizard )
Assigned to: CPU Architecture:Any
Tags: C#, data source designer, MySql Connector

[23 Mar 2010 8:04] Mo Heaven
Description:
I am battling with a bug:

Trying to create a dataset with a datatable or a tableadapter in visual studio 2008 fails using mysql connector 6.05.

1) I cannot even drag and drop an entity data model from the server explorer  unto my windows form. 

2) I cannot create a dataset using the data source wizard. When i try to add a new data source, Data-> Add New Data Source, the Data configuration wizard comes up, i select database. Click Next button twice to bypass the connection string configuration screens. When i get to the window where it should display the entities from the data source i get an error message:

An error occurred while retrieving the information from the database: Select command denied to user "mydbusername@.....charter.com" for table 'proc'

I have been fighting this error for almost a month now, and it's really frustrating. I want to use the visual studio designer to create my dataset and data adapter so i can drag and drop to the form easily. This will save my hours of coding time but it just don't work. I believe it had to do with the mysql connector 6.0.5, i have tried lesser versions and this seems to be the only one that appears to work. The others cannot even be recognized by visual studio when selecting a data source.

How to repeat:
create any empty vs project, create a form and create a dataset using the data source wizard. Data-> Add New Data Source, the Data configuration wizard comes up, i select database. Click Next button twice to bypass the connection string configuration screens. 

Suggested fix:
I tried downloading sp1, but install will not go through since i already have sp with higher versions. I read in another blog that installing sp1 might help but it didn't for me. BTW, i have .net framework v3.5 sp1 Microsoft vs 2008 version 9.0.21022. I am running Msql 5.1.45 on a remote server.
[23 Mar 2010 8:45] Tonci Grgin
Hi Moses and thanks for your report.

This is not a bug. Please read the manual, it is better than wasting time. The problem you report is described in http://dev.mysql.com/doc/refman/5.1/en/connector-net-connection-options.html:
Use Procedure Bodies 	true 	Setting this option to false indicates that the user connecting to the database does not have the SELECT privileges for the mysql.proc (stored procedures) table. When to set to false, Connector/NET will not rely on this information being available when the procedure is called. Because Connector/NET will be unable to determine this information, you should explicitly set the types of the all the parameters before the call and the parameters should be added to the command in the exact same order as they appear in the procedure definition. This option was added in Connector/NET 5.0.4 and Connector/NET 1.0.10.

You simply do not have rights over mysql.proc while, at the same time, you have set "Use Procedure Bodies" to true. Reading how MySQL privileges system works might help too.
[25 Mar 2010 0:12] Mo Heaven
Thank you! I added Use Procedure Bodies=False to the connectionstring and it works.