Authentication works and fails in the same code
Posted by: JORGE GONZALEZ
Date: June 01, 2017 10:59PM

Hi,

I'm trying the parking example:

https://dev.mysql.com/doc/connector-net/en/connector-net-entityframework60.html

I copy-paste the code, only change port and password.

This works:

using (Parking contextDB = new Parking(connection, false))
{
contextDB.Database.CreateIfNotExists();
}

Even created the database and table.

But this:

context.Cars.AddRange(cars);

thrown this exception:

Authentication to host 'localhost' for user 'root' using method 'mysql_native_password' failed with message: Access denied for user 'root'@'localhost' (using password: NO)

How can be an authentication error if the same connection was able to create the database and table?

Options: ReplyQuote


Subject
Written By
Posted
Authentication works and fails in the same code
June 01, 2017 10:59PM


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.