1

We are using v6.9.9 of the .Net MySql Connector to access MySql using this connection string, specifying that SSL is required.

Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
SSL Mode=Required

Our DBA has turned on support for SSL, but during my testing, I am able to connect to the server regardless of whether I have certificates installed on my machine, and also regardless of whether I have "SSL Mode=Required" or not.

However, when my DBA disabled SSL, if I use the above connection string, I got an error that SSL was not enabled.

Therefore, I really just don't know if my network traffic is being encrypted or not. How can I verify?

--

My question is a bit of a duplicate to this one with no accepted answer.

How to check whether a MySQL connection is SSL encrypted?

Some recommend using WireShark to test. Does anyone have step-by-step instructions on how to use this tool to verify my SSL connections?

--

This link talks about calling "status" from the MySql client. https://dba.stackexchange.com/questions/36776/how-can-i-verify-im-using-ssl-to-connect-to-mysql

I asked my DBA to try it - but he isn't able to call that method against my connection, only against his local connection. Is there anyway to call this, for example, within my c# code? I tried this, but I don't think the returned values tell me if the connection is SSL or not.

SHOW SESSION STATUS LIKE '%Ssl%';

Anyone with detailed information on how to verify my SSL connections would be greatly appreciated! Thank you!

1 Answer 1

0

Didn't work a lot with databases, but network/wireshark expertise is enough for you task. So what should you do:

  1. Prepare capture setup using this tutorial
  2. Start sniffing network with wireshark and perform some queries to your database
  3. Filter traffic by database IP-address and/or port using display filter, so irrelevant packets aren't shown
  4. Examine displayed packets. Compare them to sample of MySQL over TCP and to sample of MySQL over SSL. Hint: you can see queries as a plain text in unprotected connection, while SSL makes packet payload look like bunch of random garbage.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.