简体   繁体   English

如何在 Visual Studio 2019 中连接到 MySQL 数据源?

[英]How to connect to a MySQL Data Source in Visual Studio 2019?

I'm trying to create a new connection using MySql as a Data Provider in Visual Studio 2019, but the list of Data source doesn't show me MySql.我正在尝试在 Visual Studio 2019 中使用 MySql 作为数据提供程序创建新连接,但数据源列表没有显示 MySql。 So I check out my mysql-connector and I had the 8.0.15.msi version.所以我检查了我的 mysql-connector 并且我有 8.0.15.msi 版本。 I found out that i should have the older version because starting with version 6.7, Connector/Net will no longer include the MySQL for Visual Studio integration.我发现我应该使用旧版本,因为从 6.7 版开始,Connector/Net 将不再包含用于 Visual Studio 集成的 MySQL。 So i uninstalled my current version and reinstalled this one 6.6.6 but it still dosen't work.所以我卸载了我当前的版本并重新安装了这个 6.6.6 但它仍然不起作用。

What connector should i Install for visual studio 2019?我应该为 Visual Studio 2019 安装什么连接器?

在此处输入图片说明

I had same problem and I solved with this.我有同样的问题,我解决了这个问题。

First update your components to:首先将您的组件更新为:

  • Connector/NET 8.0.17连接器/网络 8.0.17
  • MySQL for Visual Studio 2.0.5用于 Visual Studio 2.0.5 的 MySQL
  • MySQL Server 5.5 or higher MySQL 服务器 5.5 或更高版本
  • Entity Framework 6 assemblies实体框架 6 程序集
  • .NET Framework 4.0 or higher (.NET Framework 4.5.1 or higher is required for Connector/NET 6.10 and 8.0) .NET Framework 4.0 或更高版本(连接器/NET 6.10 和 8.0 需要 .NET Framework 4.5.1 或更高版本)

Second review the project packages reference and config files because the NuGet Package Manager don't update it correctly in this Visual Studio version.第二次查看项目包引用和配置文件,因为 NuGet 包管理器在此 Visual Studio 版本中未正确更新它。

This article is in portuguese and You can translate it at Google.这篇文章是葡萄牙语,你可以在谷歌翻译。 It is a step-by-step about Visual Studio 2019 and MySQL integration written by myself: http://sistemaseweb.com.br/Pagina/Detalhes/90/migrando-e-atualizando-um-projeto-net-mvc-3-com-mysql-no-visual-studio这是我自己写的关于Visual Studio 2019和MySQL集成的一步一步: http : //sistemaseweb.com.br/Pagina/Detalhes/90/migrando-e-atualizando-um-projeto-net-mvc-3 -com-mysql-no-visual-studio

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法使用 Visual Studio 2019 连接 MySQL 数据库 - Unable to connect with MySQL database with visual studio 2019 如果想与 mysql 连接,Visual Studio 2019 中的 con.open() 错误 - con.open() error in visual studio 2019 if want to connect with mysql 在 Visual Studio 2019 中添加新数据源失败 - Add new Data source in Visual Studio 2019 Faild 如何在 Visual Studio 2019 中从 C# 连接到 SQL 服务器 - How to connect to SQL Server from C# in Visual Studio 2019 删除 Visual Studio 2019 上的 Source Map 部分 - Remove Source Map section on Visual Studio 2019 如何在 Visual Studio for Mac 上连接 MySQL DB - How to connect MySQL DB on Visual Studio for Mac 如何使用visual studio 2019和javascript从api获取数据? - How to get data from api using visual studio 2019 and javascript? ASP.NET,Visual Studio 2019,MySQL。找不到数据提供程序“Mysql.Data.MySqlClient” - ASP.NET, Visual Studio 2019, MySQL. The data provider 'Mysql.Data.MySqlClient' could not be found Mysql 未出现在 Visual Studio 2017 的“选择数据源”中 - Mysql is not appearing in “Choose Data Source” for Visual studio 2017 MySQL数据源未出现在Visual Studio 2010 Express Edition中 - MySQL data source is not appearing in Visual studio 2010 express edition
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM