VS 2010, Mysql, Entity Framework and Setup wizard ended prematurely because of an error

UPDATE: If you found this from this Stackoverflow question, could you help me out?  If you liked my answer, vote it up, if you don’t then post a comment why.  There are other higher voted answers that are wrong!  Thanks.

Below are the steps required to get the Entity Framework on VS 2010 to talk to MYSQL.

First step is to install the .net Connector.  I had to use v6.3.1 (alpha).

I tried this with 6.1.3, 6.1.4, 6.2.4 or 6.3.0 but none of them worked.  (For some reason they kept ignoring vs 2010)

Still, 6.3.1 gave me the message:  “Setup wizard ended prematurely because of an error” message and it quit.

The workaround is to rename your config folder C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Config to Configxxx fixed this.  See this link for more information

Happy days!

[UPDATE] 6.2.3 is now under general release.  This still doesn’t work for VS2010.  As @Marcus mentions below, 6.3.2 is in beta and I can confirm this does work!  (It also doesn’t have “Setup wizard ended” error.)

Getting VS 2008 & mysql to play nicely!

I love linq!

But getting mysql to place nicely isn’t so straight forward.   To get mysql running on .net 3.5 or 4.0 I had to do the following:

1.  Install the mysql .net connector
2.  Add the MySQL Data Provider line in the DbProviderFactories to your machine.config file:

<system.data>
    <DbProviderFactories>
        <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.1.0.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
    </DbProviderFactories>
</system.data>

(see here for more information)

3.  Restart Visual Studio
4.  Add your models and go nuts!

This Stack Overflow question helped

Good luck!

mysql Table '' is marked as crashed and should be repaired

I had an interesting error message today!

mysql Table ” is marked as crashed and should be repaired

The solution was easy enough. Go to the directory of the database, type:
myisamchk *.MYI -s
This will check all tables. For those that need to be fixed:
myisamchk -r tbl_name

Source: http://dev.mysql.com/doc/refman/5.0/en/myisam-repair.html

Also this link went into a little more detail on why it happened and what you can do to minimse it happening again:
http://www.softwareprojects.com/resources/programming/t-how-to-fix-mysql-database-myisam-innodb-1634.html

Rock on!