Search
Question: error when using ensembldb with a MySQL server
0
gravatar for Didi
10 months ago by
Didi10
Didi10 wrote:

Hi, 

When trying to run this script through R, I've got the error highlighted in yellow. Any idea how to solve this issue?

Thanks a lot.

Cheers,

Didi

> library(ensembldb)
> library(RMySQL)
> dbcon <- dbConnect(MySQL(), host = "localhost", user = "readonly",
+                                  pass = "readonly")
Error in .local(drv, ...) : 
  Failed to connect to database: Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
ADD COMMENTlink modified 10 months ago by James W. MacDonald48k • written 10 months ago by Didi10

This sounds like there is a problem connecting to MySQL which is independent of R. Is the MySQL server running? Can you connect using mysql -h localhost -u readonly -p ? or if you use 127.0.0.1 instead of localhost?
 

ADD REPLYlink modified 10 months ago • written 10 months ago by Johannes Rainer1.3k

Thanks a lot. When using  mysql -h localhost -u readonly -p I'm getting this error:
ERROR 1045 (28000): Access denied for user 'readonly'@'localhost' (using password: YES)

 

ADD REPLYlink written 10 months ago by Didi10

You need to create a user. Please refer to the mysql documentation for that - you'll find a lot information on the internet how to create a new user in mysql.

ADD REPLYlink written 10 months ago by Johannes Rainer1.3k
0
gravatar for James W. MacDonald
10 months ago by
United States
James W. MacDonald48k wrote:

RMySQL is a CRAN package, not Bioconductor. So you should ask your question on either r-help (r-help@r-project.org) or stackoverflow.com.

ADD COMMENTlink written 10 months ago by James W. MacDonald48k

Thanks a lot.

ADD REPLYlink written 10 months ago by Didi10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 388 users visited in the last hour