0

Can I connect to a Ubuntu server, that is running MySQL using ADO.NET or do I need a special driver?

2 Answers 2

1

You'll need the MySQL Connector/NET ADO.NET driver.

Once installed, it behaves almost identically to Microsoft's native System.Data.SqlClient. Instead of importing that namespace, use MySQL's:

using MySql.Data.MySqlClient;

...

MySqlConnection DB = new MySqlConnection("SERVER=...");

Basically, just prepend My where you'd use any of the MS SqlClient classes.

Sign up to request clarification or add additional context in comments.

Comments

1

You use Connector/NET.

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.