Click here to Skip to main content
16,016,712 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
connection problem,I have listed the error when i execute C# program

Authentication to host 'localhost' for user 'root' using method 'mysql_native_password' failed with message: Access denied for user 'root'@'localhost' (using password: YES)


Please help
Posted

You have attempted to access the mysql database using root username but with empty or wrong password. Find out the valid username and password for that database and correct them in your connection string accordingly.
BTW, you should not use root account to access your database, you should create a separate user account with limited privileges for that database. Read this: create-a-mysql-database-username-password-and-permissions-from-the-command-line[^].
 
Share this answer
 
v3
Comments
Gokul Athithan 8-Mar-14 5:18am    
I have checked username and password it has been correct
Gokul Athithan 8-Mar-14 5:42am    
Sorry,In my system WampServer(MySql) and separate MySql server has been running so that i got this issue.
Peter Leow 8-Mar-14 7:03am    
More importantly, you have solved the problem. Well done.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900