Below is the error with Entity Framework 4.3+ versions
http://www.cnblogs.com/shouzheng/archive/2012/03/09/2388177.html
(translated) Use EntityFramework to develop First code and one case of MySql database problem
I want to use the latest version of EF since the migration function is not available with version <= 4.1.
MySql.Data.MySqlClient.MySqlException (0x80004005): You have an error in the SQL syntax; check the manual that matches your MySQL server for the correct syntax for use next to "NOT NULL", ProductVersionmediumtext NOT NULL);
ALTER TABLE 3 createMigrator, ObjectContext objectContext) in System.Data.Entity.Internal.InternalContext.CreateDatabase (ObjectContext objectContext) in System.Data.Entity.Database.Create () at System.Data.Entity.DropCreateDatabaseAlways 1.b_0 (DbContext System.Data.Entity.Internal.InternalContext <.> C_DisplayClass8.b_6 () in System.Data.Entity.Internal.InternalContext.PerformInitializationAction (Action action) in System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization). Data.Entity.Internal.LazyInternalContext.b_4 (InternalContext Cat System.Data.Entity.Internal.RetryAction 1 action) in System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase ()__MigrationH' at line 6 at
MySql.Data.MySqlClient.MySqlStream.ReadPacket() at
MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow,
Int32& insertedId) at MySql.Data.MySqlClient.Driver.GetResult(Int32
statementId, Int32& affectedRows, Int32& insertedId) at
MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean
force) at MySql.Data.MySqlClient.MySqlDataReader.NextResult() at
MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior
behavior) at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
at System.Data.Objects.ObjectContext.ExecuteStoreCommand(String
commandText, Object[] parameters) at
System.Data.Entity.Internal.InternalContext.ExecuteSqlCommand(String
sql, Object[] parameters) at
System.Data.Entity.Database.ExecuteSqlCommand(String sql, Object[]
parameters) at
System.Data.Entity.Migrations.History.HistoryRepository.BootstrapUsingEFProviderDdl(XDocument
model) at
System.Data.Entity.Internal.InternalContext.<SaveMetadataToDatabase>b__4()
at
System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action
action) at
System.Data.Entity.Internal.InternalContext.SaveMetadataToDatabase()
at
System.Data.Entity.Internal.DatabaseCreator.CreateDatabase(InternalContext
internalContext, Func
1.InitializeDatabase(TContext
context) at
System.Data.Entity.Database.<>c__DisplayClass21.PerformAction(TInput input)
at
System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action
in System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType (Type entityType) in System.Data.Entity.Internal.Linq.InternalSet 1.Initialize() at
System.Data.Entity.Internal.Linq.InternalSet1.get_InternalContext ()
in System.Data.Entity.Internal.Linq.InternalSet 1.ActOnSet(Action
action, EntityState newState, Object entity, String methodName) at
System.Data.Entity.Internal.Linq.InternalSet1.Add (object object)
in System.Data.Entity.DbSet`1.Add (TEntity object) in DBPreparationTool.Form1.PrepareDB_Click (object sender, EventArgs e) in D: \ Workspaces \ Experiments \ FaizeMBRoot \ Source \ DBPreparationTool \ Form1.cs: line 39 in System.Windows.Forms.Control.OnClick (EventArgs e) in System.Windows.Forms.Button.OnClick (EventArgs e) in System.Windows.Forms.ButtonBase.OnKeyUp (KeyEventArgs kevent) in System.Windows.Forms.Control. ProcessKeyEventArgs (Message & m) in System.Windows.Forms.Control.ProcessKeyMessage (Message & m) in System.Windows.Forms.Control.WndProc (Message & m) in System.Windows.Forms.ButtonBase.WndProc (Message & m ) in System.Windows.Forms.Button.WndProc (Message & m) in System.Windows.Forms.Control.ControlNativeWindow.OnMessage (Message & m) in System.Windows.Forms.Control.ControlNativeWindow.WndProc (Message & m) in System.Windows.Forms.NativeWindow.Callback (IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)