tags:

views:

46

answers:

1

Am new to mysql,

I want to write a mysql connection code.

Tried Code.

  string MyConString = "SERVER=localhost;" +
                "DATABASE=Database1;" +
                "UID=root;" +
                "PASSWORD=root;";
        MySqlConnection connection = new MySqlConnection(MyConString);

When i run the above code it is showing error in MySqlConnection assembly references.

Need MySql Connection code.

+1  A: 

Seems that you are using the MySql connector for .NET. Check this out:

http://www.connectionstrings.com/mysql#28

despart