Search code examples
mysqldatasourcevisual-studio-2022

Where is the MySQL Datasource option for Server Explorer in Visual Studio 2022?


I am currently working with Visual Studio 2019 and my database is MySQL 8.2.

When I want to connect to my database with Server explorer, in Visual Studio 2019, one of the connection methods listed was MySQL Database. But at the same time when I use Visual Studio 2022, the option is not available. I tried to configure MySQL. But that is of no use as in Visual Studio 2022m the option is not listed. Is there any other method to bring in MySQL?

enter image description here

Tried ODBC, which works to some extent, but it is not good enough. Is there any workaround?


Solution

  • Update:

    Seems at some point Oracle has deprecated "MySQL for Visual Studio" and they "encourage" users to switch over to MySQL Shell for VS Code:

    Per Oracle's Lifetime Support policy, as of Dec 8, 2022, MySQL for Visual Studio is covered under Oracle Sustaining Support. Users are encouraged to use MySQL Shell for VS Code.


    Original Answer:

    Based off of this other post, you would normally have to install a separate program called "MySQL for Visual Studio". The current version of this program is 1.2.10. However, it seems they do not yet support Visual Studio 2022 according to this documentation. Visual Studio 2019 appears to be the latest version they have support for (since version 1.2.9):

    Version Support for Visual Studio

    • MySQL for Visual Studio 1.2.10:

      • Support for Microsoft Visual Studio 2015 was removed.
    • MySQL for Visual Studio 1.2.9:

      • Support for Microsoft Visual Studio 2019 was added.

    They also have a table here showing the supported verisons.