• Tuesday , 12 December 2017

C# Tutorial 1:Getting Started and Mysql database Connection

Code Canyon

C# Windows Form Application Mysql Connection c# – How can I connect to MySQL from windows forms? Using Visual C# Windows Forms with MySQL C# …

Original source

3d Ocean

Related Posts


  1. Black Panther martial arts
    July 4, 2017 at 02:11

    just three words ….you are awesome

  2. Amanullah Wesal
    July 4, 2017 at 02:11

    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

  3. Jason Douglas
    July 4, 2017 at 02:11

    try this MySQL connector, it's awesome https://www.devart.com/dotconnect/mysql/

  4. puja jha
    July 4, 2017 at 02:11

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

    July 4, 2017 at 02:11

    Sir, i want to add subscript and superscript string in label. how can i do it? please help me.

  6. shivkumar kanojiya
    July 4, 2017 at 02:11

    hello sir my visual stdio me my sql data nahi milta hai please

  7. Andrii Diachuk
    July 4, 2017 at 02:11

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

  8. 1611KJB
    July 4, 2017 at 02:11

    Don't know if it matters, but tutorial #3 is missing (assuming it's not supposed to go from #2 to #4)

  9. King Sanu
    July 4, 2017 at 02:11

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

  10. Kevan Wiegand
    July 4, 2017 at 02:11

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


  11. Steve Burrus
    July 4, 2017 at 02:11

    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?

  12. Steve Burrus
    July 4, 2017 at 02:11

    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)



  13. VTechnologies Stuff
    July 4, 2017 at 02:11

    i go t that error The system detected an invalid pointer address in attempting to use a pointer argument in call

  14. trentcreek
    July 4, 2017 at 02:11

    How about a WPF database connection example?

  15. trentcreek
    July 4, 2017 at 02:11

    The first part does not make a lot of sense. When installing Visual Studio, it will install the SQL Server by default.

  16. Joshua De Jesus
    July 4, 2017 at 02:11

    such a relief! Thanks bro 🙂

  17. Putra Wahyu S
    July 4, 2017 at 02:11

    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?

  18. Veverly Yumul
    July 4, 2017 at 02:11

    Watch it in Speed:1.5

  19. ilovarat smurf
    July 4, 2017 at 02:11

    an 18 minute video showing a single block of fucking code are you serious

  20. Juan Diaz
    July 4, 2017 at 02:11

    why havent you answered jersons question?

  21. Tomek Jankiewicz
    July 4, 2017 at 02:11

    slow. i cant take this mouse movements ;/

  22. Jerson Quispe
    July 4, 2017 at 02:11

    Why did you create data adapter and command builder?

  23. saimur rahman
    July 4, 2017 at 02:11

    Please,Sir.Can you tell me,the version name of MySql workbrench?

  24. Ronie Cantonjos
    July 4, 2017 at 02:11

    What if there's no MySql.Data in the add reference ?

  25. jopet hern
    July 4, 2017 at 02:11

    is it okay to use VS 2015 in following this tutorial?

  26. Devart
    July 4, 2017 at 02:11

    You can go through the easy way and connect your SQL Server database with C# application by means of new MySQL ODBC driver https://www.devart.com/odbc/mysql/download.html

    ODBC driver connection guide https://www.devart.com/odbc/mysql/docs/driver_configuration_and_conne.htm

  27. john bekar
    July 4, 2017 at 02:11

    thanks brother

  28. Petrol Head
    July 4, 2017 at 02:11

    guys i'd like to replace localhost, port, username and password with textbox texts when pressing a button.
    I tried MyConnection.Replace("localhost", textBox1.Text); but it does not seem to work. Suggestions?

  29. mahad Amoore
    July 4, 2017 at 02:11


  30. Gian-Luca Nardini
    July 4, 2017 at 02:11

    thanks for the link dumbass

  31. kevindt12
    July 4, 2017 at 02:11

    i swear i hate thease indians

  32. M Hambalie
    July 4, 2017 at 02:11

    i follow this tutorial
    now how can i create report
    another program i use report viewer. but i have problem with connecting the report viewer with mysql database
    any idea guy..

  33. linuxmq
    July 4, 2017 at 02:11

    Why did you write the line about creating a MySqlCommandBuilder cb = new… as you are not using it anywhere in the code? I thought this would have to go in the myConn.Open(cb) and MyConn.Close(cb)?

  34. Kalyan kumar
    July 4, 2017 at 02:11

    Hi sir…!!! I have got a problem of signal encoding in c#. The user had to enter frequency and amplitude and accordingly we have to draw a sine wave of y=sin*2*pi*f*t , which should be displayed on a form. so please tell us how to draw the sine wave given frequency and amplitude?

  35. vinod kashyap
    July 4, 2017 at 02:11


  36. Ahmed Mehmood
    July 4, 2017 at 02:11

    i still cant find the MySQL.Data in the referencess

  37. Γιάννης Γρηγοριάδης
    July 4, 2017 at 02:11

    Thanks for video! How can i connect from the internet ? Not only from the local machine.

  38. Enverdo
    July 4, 2017 at 02:11

    Hi! we're new on YouTube and make new tech videos, so make sure you subscribe and ask us questions and problems you've been facing for us to help!

  39. Jonas Karlsson
    July 4, 2017 at 02:11

    So slow.

  40. ShawnTD
    July 4, 2017 at 02:11

    Have you ever used nobe.js

  41. Christian Ramiro
    July 4, 2017 at 02:11

    Thanks bro, this video opened my mind about Visual C#. I'm looking forward for the next episodes.

  42. jasonjjj27
    July 4, 2017 at 02:11

    I am going to be taking a class soon and I was watching this video series before hand so it won't be such a shock to me when class starts.  My question is, What is the difference between c# and c#.net?  What should I be studying, and what are the advantages/disadvantages of learning this language compared to something like c++?  I thank anyone who can help me understand this so I can be pointed in the right direction with my learning.

  43. chadli abdelkarim
    July 4, 2017 at 02:11

    this is perfect thank you.
    but i need to connect my c# app to a MySQL database in the server not in my localhost
    anyone can help me please

    July 4, 2017 at 02:11

    Thank you

  45. eyoh leor
    July 4, 2017 at 02:11

    hi where can i contact u i want to ask many thing about c# can u teach me pls reply

  46. gogeous mystique
    July 4, 2017 at 02:11

    i have an error with the data source

Leave A Comment

You must be logged in to post a comment.