MySQL authentication error with .NET connector 8.0
When we use the .NET connector to connect to our emote MySQL we get the error below.
MySql.Data.MySqlClient.MySqlException (0x80004005): Authentication to host 'XX.XXX.XXX.XX' for user 'YYYYYYY' using method 'mysql_native_password' failed with message: Access denied for user 'YYYYYYY'@'ZZZ.ZZZ.ZZZ.ZZZ' (using password: YES) ---> MySql.Data.MySqlClient.MySqlException (0x80004005): Access denied for user 'YYYYYYY'@'ZZZ.ZZZ.ZZZ.ZZZ' (using password: YES)
We have used the code below to generate the connection string.
var builder = new MySqlConnectionStringBuilder();
builder.Server = "XX.XXX.XXX.XX";
builder.UserID = "YYYYYYY";
builder.Password = "PPPPPPPPPPP";
builder.SslCa = @"D:\certs\server-ca.pem";
builder.SslKey = @"D:\certs\client-key.pem";
builder.SslCert = @"D:\certs\client-cert.pem";
builder.SslMode = MySqlSslMode.VerifyFull;
builder.Database = "noodlewatch";
builder.Port = 3306;
builder.Pooling = true;
builder.UseCompression = true;
MySqlConnection conn = new MySqlConnection(builder.ConnectionString);
We thought it has to do with the password and reset it and it still didn't work, have been able to connect to it successfully using HeidiSQL and so there doesn't seem to be any problem at the server end.
Any ideas on what needs to be done?
Subject
Written By
Posted
MySQL authentication error with .NET connector 8.0
November 13, 2019 03:26AM
February 28, 2020 05:09PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.