简体   繁体   中英

Visual Studio ADO .NET can't connect to mysql database

I work on Windows Forms project in C# and I need to connect to mysql database (localhost:3306). I use Entity framework 6.4.0 and .NET Connector 8.0.18. When I go to Project -> Add New Item -> Data -> ADO .NET Entity Model and go to Code First from database -> New Connection , my Choose Data Source Dialog haven't option for MYSQL DATABASE在此处输入图片说明

I have Mysql Workbench 8.0 and I connected to database.

When I click on other option I have dialog:

在此处输入图片说明

Can't find database to select. Where is the problem?

For that case, it normally happens when you install visual studio after installation of MySQL. Try re-installing MYSQL then it will have to work.

Note: Ensure backing up all your databases first

Happy programming.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM