error when using ensembldb with a MySQL server
1
0
Entering edit mode
Didi ▴ 10
@didi-10905
Last seen 9 months ago
Spain

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)
ensembldb rmysql • 1.4k views
ADD COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode
@james-w-macdonald-5106
Last seen 2 hours ago
United States

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 COMMENT
0
Entering edit mode

Thanks a lot.

ADD REPLY

Login before adding your answer.

Traffic: 452 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6