F. Gran F. Gran - 4 months ago 7
MySQL Question

Diffrence between using `MySql.Data` and `MySql.Data.MySqlClient`

I am trying to connect to a

server using the
. I think it should work since
is a drop-in replacement for MySQL.

Found a helpful answer here on StackOverflow, however there is one thing that confuses me.

At the very top of his code he or she uses
using MySql.Data
using MySql.Data.MySqlClient
. Other tutorials I have found only mention the
using MySql.Data

I apologize if the question is silly, but I really want to understand why is he or she using both statements and not just
using MySql.Data


In this question MySqlConnection and MySqlCommand are used so you can remove MySql.Data because both classes are part of the namespace MySql.Data.MySqlClient.

You could als write MySql.Data.MySqlClient.MySqlConnection and MySql.Data.MySqlClient.MySqlCommand and remove both using statements.