My problem is that I am able connect database without using password and also able execute the queries but when I am trying to connect database with password it is giving error. The details I have mentioned below what I am doing and what is the error:
>library(DBI)
>library(RMySQL)
>drv<-dbDriver("MySQL")
>con<-dbConnect(drv,user="sam",password="sam123",dbname="test")
then the error is like:
Error in mysqlNewConnection(drv, ...) : RS-DBI driver: (Failed to connect to database: Error: Access denied for user 'sam'@'localhost' (using password: YES)
Please help me out of this problem.