I'm connecting to a MySQL server that requires SSL, using a MySqlConnection
:
var connection = new MySqlConnection("Data Source=127.0.0.1;Database=MyDb1;User Id=root;Password=blabla;encrypt=true");
This succeeds if the server doesn't require SSL, but after executing GRANT USAGE ON *.* TO 'root'@'localhost' REQUIRE SSL;
on the server, it starts failing with:
ProviderIncompatibleException: The provider did not return a ProviderManifestToken string. ---> MySql.Data.MySqlClient.MySqlException: Authentication to host '127.0.0.1' for user 'root' using method 'mysql_native_password' failed with message: Access denied for user 'root'@'localhost' (using password: YES) ---> MySql.Data.MySqlClient.MySqlException: Access denied for user 'root'@'localhost' (using password: YES)
How is SSL enabled? Should something be added to the connection string or is it done programmatically?