Entering edit mode
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)
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?
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)
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.