Are you sure the user root, without a password, has access to your database?
pritaeas
Posting Prodigy
9,309 posts since Jul 2006
Reputation Points: 1,178
Solved Threads: 1,465
Skill Endorsements: 86
I don't use MySQL but based on this , the connection string looks wrong. It looks more like a SQL Server connection string.
TnTinMN
Practically a Master Poster
640 posts since Jun 2012
Reputation Points: 418
Solved Threads: 148
Skill Endorsements: 13
This should really be moved to the C# forum.
TnTinMN
Practically a Master Poster
640 posts since Jun 2012
Reputation Points: 418
Solved Threads: 148
Skill Endorsements: 13
Does the root account exist in your local host MySQL server?
Does the root account exist without a password?
for 1 & 2 try to login to mysql with the username as root and empty string '' as password
If you could login with the given credentials
Try giving a password to the root account granting permissions in the MySQL command prompt
I hope the GRANT statement goes like this
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY somepassword
replace somepassword with your password
and change the connection string
string connectionString = "server=localhost;User Id=root;database=customerInfo;Password=somepassword;
samsylvestertty
Junior Poster in Training
75 posts since Oct 2010
Reputation Points: 22
Solved Threads: 4
Skill Endorsements: 0