-
January 27th, 2006, 12:55 PM
#1
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
-
January 27th, 2006, 12:58 PM
#2
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').
-
January 28th, 2006, 03:49 AM
#3
Re: connect to MySql
its ok now
thanks for the help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|