HI Ashim, That error means that your user number or group is not allowed to access it. Did you create the new one as a different user, maybe as root?
Jim On Thu, Oct 28, 2021 at 4:42 PM Ashim Kapoor <ashimkap...@gmail.com> wrote: > > Dear R - users, > > I have 2 databases on a MySQL server. I am able to access the old one > but not the freshly created one. > > library(RMySQL) > # This one is the old one, I am able to access it, > > con1<- dbConnect(MySQL(),host= "myserver", db="db1", user= "user1",password > > ="mypass1") > > # This is the new one. I am getting an error. > > con2 <- dbConnect(MySQL(),host= "myserver", db="db2", user= > > "user2",password="mypass2") > Error in .local(drv, ...) : > Failed to connect to database: Error: Access denied for user > 'user2'@'myserver' (using password: YES) > > > > Can someone please point me in the right direction? The error is not > clear. I do not think I have mistyped the credentials. > > Many thanks, > Ashim > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.