[R] Error with RMySQL

Jim Lemon drj|m|emon @end|ng |rom gm@||@com
Thu Oct 28 07:57:07 CEST 2021


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 <ashimkapoor using 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 using 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.



More information about the R-help mailing list