C# Tutorial 1:Getting Started and Mysql database Connection


★★★Top Online Courses From ProgrammingKnowledge ★★★
Python Programming Course ➡️ ⚫️
Java Programming Course ➡️ ⚫️
Bash Shell Scripting Course ➡️ ⚫️
Linux Command Line Tutorials ➡️ ⚫️
C Programming Course ➡️ ⚫️
C++ Programming Course ➡️ ⚫️
PHP Programming Course ➡️ ⚫️
Android Development Course ➡️ ⚫️
C# Programming Course ➡️ ⚫️
JavaFx Programming Course ➡️ ⚫️
NodeJs Programming Course ➡️ ⚫️
Jenkins Course For Developers and DevOps ➡️ ⚫️
Scala Programming Tutorial Course ➡️ ⚫️
Bootstrap Responsive Web Design Tutorial ➡️ ⚫️
MongoDB Tutorial Course ➡️ ⚫️
QT C++ GUI Tutorial For Beginners ➡️

★★★ Online Courses to learn ★★★
Get 2 FREE Months of Unlimited Classes from skillshare –
Data Science – |
Machine Learning – |
Artificial Intelligence – |
MERN Stack E-Degree Program – |
DevOps E-degree – |
Data Analytics with R – |
AWS Certification Training – |
Projects in Java – |
Machine Learning With TensorFlow – |
Angular 8 – Complete Essential Guide –
Kotlin Android Development Masterclass –
Learn iOS Programming Building Advance Projects –

★★★ Follow ★★★
My Website –

DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!
C# Windows Form Application Mysql Connection
c# – How can I connect to MySQL from windows forms?
Using Visual C# Windows Forms with MySQL
C# Programming for beginners: How to connect MySQL Database
Windows Form Application using Mysql Server
Connect MySQL from C# Windows Forms
mysql problem to connect with windows form c#
C# Windows Form Application Mysql Connection
Mysql And Visual C# 2010 Windows Form Application
MySQL :: Connecting to MySQL with a Windows Form application
C# Form textbox string into SQL Database
visual c# CLR windows form application and mysql
assembly reference not working in C# script
Trying to connect to MySQL from C# application
mysql and C# window form application
How to connect MySQL using C#?‎



  1. how do I make visual studio recognize the database I just created ? I added the reference mysql.data.dll and also added the line using mysql.. still visual studio does not recognize the database name..

  2. just a little confusion, can any one tell me : "is it necessary to learn windows form(c# gui based) application before moving to asp.net web forms? or just to know c# on console itself is enough to move towards asp.net web form ? plz help 🙂

  3. Bro MySqlConnection nahi hora mery 2013 ma, sqlconnection hota hora ha , par phir adp.SelectCommand("select * from database.edata" , conn); par error

  4. Thanks for the video! Very helpful. Just want to give my two cents. I usually use dotConnect to access database applications @t and I am pretty satisfied with it.

  5. //I have to write it
    string myConnection = "datasource=localhost;port=3306;username=root;password=root";
    MySqlConnection myConn = new MySqlConnection(myConnection);
    MySqlDataAdapter myDataAdapter = new MySqlDataAdapter();
    myDataAdapter.SelectCommand = new MySqlCommand("select * database.edata ;", myConn);
    MySqlCommandBuilder cb = new MySqlCommandBuilder(myDataAdapter);
    DataSet ds = new DataSet();
    catch (Exception ex)

  6. Hi sir, I really appreciate your struggles. Please make a video tutorial on serialization in C#.
    If it already exists then please send me the link.

  7. Hello. I just wanted to take out time to say thank you, i have greatly improved in C# through the help of this tutorials. thanks alot.. i'll love to keep in good communication with you if thats okay. Thanks. My email is efosaodigie@outlook.com

  8. After Compliments
    i would like to request the following
    1) – Save image on system (not in database)
    2) – and how to retrieve that image in reference of the record against which the image was saved

    please help

    with regards

  9. hi Sir :
    one problem i have in database :

    how to save text(comment) and pdf file in sql to show in visual studio using c#

    please help me

  10. MySqlConnection conDataBase = new MySqlConnection(constring);// constring is showing error in update ,delete bottom but in insert buttom it is not showing any error

  11. There is error which provide exception. So, replace first line in block 'try' by this:
    String myConnection = "SERVER=localhost;UID=root;PASSWORD=root;";

  12. so how the database work on another PC means i build the software package, then the SQL where stored in them computer.

  13. This caused me some errors with the syntax. Below is a link to the correct syntax:


  14. Lis ten I cannot get that MySql.Data in the "References -> Add References" dialog! Only the MySql.Data.Entity can I get. Can someone pls help me with this?

  15. Lisren I used your code exactly as you had typed it out but got the error msg. when I clicked the button that said "Keyword Not Supported:'datasource' " How do I fix this problem?

    using System;
    using MySql.Data.MySqlClient;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Data.SqlClient;

    namespace MyWinFormApp1
    public partial class Form1 : Form
    public Form1()

    private void button1_Click(object sender, EventArgs e)
    string myConn = "datasource = localhost;port = 3306; username = root; password = steve";
    SqlConnection myConnection = new SqlConnection(myConn);
    SqlDataAdapter mda = new SqlDataAdapter();
    mda.SelectCommand = new SqlCommand(" select * from MyDatabase.atable;", myConnection);
    SqlCommandBuilder cb = new SqlCommandBuilder(mda);
    DataSet ds = new DataSet();
    MessageBox.Show("I am totally connected!");
    catch (Exception ex)



  16. i've tried this and it seems work and shows "data saved" message box, but when i check on my sql the data wasn't saved. any help?


Please enter your comment!
Please enter your name here