Search code examples
c#mysqlauthenticationvisual-studio-2017

Authentication method 'caching_sha2_password' not supported by any of the available plugins


When I try to connect MySQL (8.0) database with Visual Studio 2018 I get this error message

"Authentication method 'caching_sha2_password' not supported by any of the available plugins"

Also I am unable to retrieve Database name. I use mysql-for-visualstudio-1.2.7 and mysql-connector-net-8.0.11 for connection. Is there any possible way to fix it.


Solution

  • I faced the same error while i was trying to connect my client machine to the Server. I had to connect to MySQL server hosted on the Server. I have got this to working. Followed the following steps:

    1. Download the latest MySQL community version i.e 8.0.18.0 installed. Make sure that the same version of MySQL is installed in the server machine. Please note that either the same version of MySQL are installed in client machine and server machine or else client machine should have higher version of MySQL installed.
    2. With the help of MySQL installer make sure that you installed 'Developer' version in your client machine, so as to have MySQL server, SQL.net, mySQL for visual studio e.t.c all will get installed in it.
    3. We are using .Net framework 4.5.2 in latest MySQL community. So, make sure you using Visual studio 2019. Build UiConfigEDItor source code in Visual Studio 2019 so that it will have support for higher version .Net framework 4.5.
    4. Now, copy all files (mysqlData.dll in particular) from SQL installed workspace(C:\Program Files (x86)\MySQL\Connector NET 8.0\Assemblies\v4.5.2) to Visual Studio 2019 workpace (C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE).
    5. Log off you machine and now open UIConfigEditor source code in visual studio 2019.

    Now in Solution Explore->References->Add References->Go to Assemblies tsb-> Extensions->Search for mysql.data.dll(make sure that its there)->check that option. Please note that mysql.data.dll is of version 8.0.18.0 in this case.