I'm asking again a part of question. ASP.NET connection with MySQL remote serve. I'm using Windows 7 as client and Windows 2012 as server. using following code :-

```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MySql.Data.Common;
using MySql.Data.MySqlClient;

public partial class college_data : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

protected void ButtonSave_Click(object sender, EventArgs e)
{

        //String DSN = "Data Source = win2012server.db.net; port = 3306; Initial Catalog = collegedata, UserId = rahul; password = rahul; sslmode = none";
        String DSN = "Data Source = win2012server.db.net; port = 3306; Database = collegedata, Uid = rahul; Pwd = rahul;";
        MySqlConnection conn = new MySqlConnection(DSN);

        conn.Open();
        if (conn != null)
        {
            String sql = "insert into studentdata values('" + TextBoxRollNo.Text.Trim() + "', '" + TextBoxStudentName.Text.Trim() + "' , '" + TextBoxFatherName.Text.Trim() + "'" +
                          "'" + TextBoxMotherName.Text.Trim() + "'";
                MySqlCommand cmd = new MySqlCommand();
            cmd.CommandText = sql;

            cmd.Connection = conn;
            cmd.ExecuteNonQuery();
            LabelDisplay.Text = "data saved";
        }
        else
        {
            LabelDisplay.Text = "connection not opened";
        }
    }
}

```

Error:

> 
> Authentication to host 'win2012server.db.net' for user '' using
> method 'mysql\_native\_password' failed with message: Access denied for
> user''@'RAHUL-PC' (using password: YES)
> 
> 
> 

in point `conn.open()`. How to solve this error?