I'm trying to connect my application with mysql server using localhost. The problem I'm facing is beyond my understanding. I've tried searching it but could not find any solution.
Error showing:
"Keyword not supported: 'uid'";
Below is the code:
Form1.cs
using System;
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;
using System.Data.Sql;
using System.Data.CData.MySQL;
using MySql.Data.MySqlClient;
namespace DataAccess
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void label4_Click(object sender, EventArgs e)
        {
        }
        private void button1_Click(object sender, EventArgs e)
        {
            MySQLConnection connection;
            String server = "localhost", database = "Student", userid = "root", password = "12345";
            String connectionString = "SERVER = " + server + ";" + "DATABASE = " + database + ";" + "USERID =" + userid + ";" + "PASSWORD = " + password + ";";
            String std_name = textBox1.Text, std_program = comboBox1.Text, std_department = comboBox2.Text;
            int std_age = Convert.ToInt32(textBox2.Text);
         //   MySQLDataAdapter mda = new MySQLDataAdapter("Insert into student.registration(Name, Age, Program, Department) Values(@std_name,@std_age,@std_program,@std_department)", connection);
            connection = new MySQLConnection(connectionString);
            MySQLCommand cmd;
            connection.Open();
            try
            {
                cmd = connection.CreateCommand();
                cmd.CommandText = "Insert into Student(Name, Age, Program, Department) Values(@std_name,@std_age,@std_program,@std_department)";
                cmd.ExecuteNonQuery();
                MessageBox.Show("Record Successfully Entered!");
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                if (connection.State == ConnectionState.Open)
                {
                    connection.Close();
                }
            }
        }
    }
}
 
     
    