I'm using MySQL .NET connector from MySQL official site. I'm trying to make a safe SSL connection from my C# program to a Mysql db. Mysql server allows to connect with SSL. have_ssl
variable is set to yes
and ca-cert
, server-cert
and server-key
are specified.
Permissions for the user are:
'GRANT USAGE ON *.* TO \'logowanie\'@\'%\' IDENTIFIED BY PASSWORD \'*...\' REQUIRE SSL'
'GRANT SELECT ON `db`.`table1` TO \'logowanie\'@\'%\''
So I assume, that this user cannot login without SSL? Am I right?
My connection string in C# program looks like that:
"server=127.0.0.1;uid=logowanie;pwd=log1;database=ewidencja;SslMode=Required";
See that this connection string doesn't have any paths to certificate files! It only has "SSLMode=Required" option. Is it possible to make SSL encrypted connection without any other SSL options?
And the user is able to login and make some select command on table1
. So I assume this connection is SSL encrypted?
How can I check whether this connection is SSL encrypted to be 100% sure?
Encrypt=True;TrustServerCertificate=True"
– Odelle