-
connect to MySql
im trying to connect to MySql like that-
Code:
MySql.Data.MySqlClient.MySqlConnection con;
string conStr = "Database=dbnet;"+
"Server=127.0.0.1;"+
"User Id=Admin;" +
"Password=;";
con=new MySql.Data.MySqlClient.MySqlConnection(conStr);
con.Open();
and im getting the error-
#28000Access denied for user 'Admin'@'localhost' (using password: NO)
what im doing wrong?
thanks in advanced
-
Re: connect to MySql
you need to make sure you have that user defined in mysql. typically admin is 'root' unless you added Admin and granted perms for it (and granted connection priv's from 'localhost').
-
Re: connect to MySql
its ok now
thanks for the help