【问题标题】:MySQL Connector 6.7.4 Entity Framework 5 Model FirstMySQL 连接器 6.7.4 实体框架 5 模型优先
【发布时间】:2013-10-02 13:47:15
【问题描述】:

我正在使用 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`

【问题讨论】:

  • 你的问题解决了吗!!!我有同样的问题

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


【解决方案1】:

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

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

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

【讨论】:

    猜你喜欢
    • 2014-01-03
    • 2013-03-12
    • 2015-04-09
    • 2011-05-29
    • 1970-01-01
    • 2012-03-03
    • 1970-01-01
    • 2020-04-10
    • 1970-01-01
    相关资源
    最近更新 更多