MySQL连接器6.7.4实体框架5模型优先

时间:2013-10-02 13:47:15

标签: mysql entity-framework-5 connector-net

我正在使用Visual Studion 2012,MySQL 5.6.14,Connector for .NET 6.7.4和Visual Studio插件1.0.2

我创建了一个实体框架但无法使用“从模型生成数据库”来实现。

我已尝试过此处建议的修改

http://bugs.mysql.com/bug.php?id=67964

但现在我得到了下面的例外(看起来好像凭证没有通过)。有没有人经历过这个?

`Error  2   Running transformation: MySql.Data.MySqlClient.MySqlException (0x80004005): Authentication to host '' for user '' using method 'mysql_native_password' failed with message: Access denied for user ''@'localhost' (using password: NO) ---> MySql.Data.MySqlClient.MySqlException (0x80004005): Access denied for user ''@'localhost' (using password: NO)
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.ReadPacket()
at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.AuthenticationFailed(Exception ex)
at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.ReadPacket()
at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.Authenticate(Boolean reset)
at MySql.Data.MySqlClient.NativeDriver.Authenticate(String authMethod, Boolean reset)
at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.Driver.Open()
at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)
at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()
at MySql.Data.MySqlClient.MySqlPool.GetConnection()
at MySql.Data.MySqlClient.MySqlConnection.Open()
at MySql.Data.MySqlClient.MySqlScriptServices.GetTableCreateScript(EntitySet entitySet, String connectionString, String version)
at Microsoft.VisualStudio.TextTemplatingD3E432D0E484C972F42C6D13E94510BEB0C48500C7AACE47A3533033751EF00050B7580D6891ADC8583A2327CA5DD242B2AF4C7A11EB05A80839B23CDA63F07B.GeneratedTextTransformation.TransformText() in c:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\DBGen\SSDLToMySQL.tt:line 133   c:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\DBGen\SSDLToMySQL.tt    133 1`

1 个答案:

答案 0 :(得分:0)

根据发行说明,您似乎需要连接器6.8.1。

http://forums.mysql.com/read.php?174,601041,601041#msg-601041

我能够使用较低版本的连接器将脚本生成模板从SQL更改为MySQL,它包含在MySQL for visual studio插件中。但可能会有一些问题。