我正在尝试连接到远程可公开访问的MySQL服务器EnsEMBL公共服务器RMySQL
,但是当我尝试列出表时,会发生错误:
library(RMySQL) mydb = dbConnect(MySQL(), user = 'anonymous', port = 5306, host = 'asiadb.ensembl.org') dbListTables(mydb) Error in .local(conn, statement, ...) : could not run statement: No database selected
有没有办法找出这个名字?或者我是否完全犯了一个完全不同的错误?
您必须在dbConnect调用中指定db的名称.例如:
mydb = dbConnect(MySQL(), user = 'anonymous', port = 5306, host = 'asiadb.ensembl.org', db = 'homo_sapiens_core_83_38') dbListTables(mydb)