C# - Unexpected authentication method mysql_native_password exception

丶灬走出姿态 提交于 2019-12-04 18:19:55

What provider are you using? If you are using MySQL Connecter .net, then you connection string should be something like...

Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

If you are using eInfoDesigns provider, then...

Data Source=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Command Logging=false;

If SevenObjects

Host=myServerAddress;UserName=myUsername;Password=myPassword;Database=myDataBase;

if Devart

User ID=root;Password=myPassword;Host=localhost;Port=3306;Database=myDataBase; Direct=true;Protocol=TCP;Compress=false;Pooling=true;Min Pool Size=0;Max Pool Size=100;Connection Lifetime=0;

if MySQLDriverCS

Location=myServerAddress;Data Source=myDataBase;User ID=myUsername;Password=myPassword;Port=3306;Extended Properties="""";

if MySql OLEDB

Provider=MySQLProv;Data Source=mydb;User Id=myUsername;Password=myPassword;

if .Net OLEDB

Provider=MySQLProv;Data Source=mydb;User Id=myUsername;Password=myPassword;

if MySQl Connector

Driver={MySQL ODBC 5.5 Driver};Server=localhost;Database=myDataBase; User=myUsername;Password=myPassword;Option=3;

More help can be found here http://www.connectionstrings.com/mysql

It is actually much easier to use SQL Server as it is built in and VS is designed to work with it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!