Codementor Events

Overview :Connecting with MySQL using C#

Published Sep 13, 2019
Overview :Connecting with MySQL using C#

Working as a developer often you plan as package.That say you are working with PHP.The package is combination:
PHP
Apache Web Server
MySQL database.No problem right.But when working for clients all is not well sometimes.

They want solutions budget is a problem.When budget is a problem then you impact is cutting down on database first.
No Oracle,No SQL Server.Opt for MySQL.

Whats the problem?Well if you are using .NET ,Microsoft you do have little problem.
The environment:
Windows OS
Development:Microsoft Visual Studio
Database    :MySQL database

Here in this post I would discuss how to connect with MySQL server using C#.

First get a notebook(you heard me).
Jot down following
OS version
.NET framework
MySQL version.

The main thing after opening your project in Visual Studio you need to install
MYSQL connector in windows.Extract sample and test it out.
Copy paste connnection string into your code.Change database name,user id and paswword and necessary info.

http://dev.mysql.com/downloads/connector/net

The version of the connector is also important.
Add details in App.config file.

Then connect with Conection string.

There are various options in connecting with  database and you should know about its advanages and demerits.
You can google and Iam not going in specifics.

Discover and read more posts from Abbas Mandal
get started
post commentsBe the first to share your opinion
Show more replies