Skip to content

DBI:dbConnect () inherited method error for RMySQL v 0.5-11 driver

3 messages · David James, Chris Cotsapas

#
Dear list,

I've been getting the error below when trying to connect to a MySQL 
database (similar to this post from late last year: 
https://stat.ethz.ch/pipermail/r-sig-db/2006-October/000224.html)

I'm using R 2.4.1 on an x86_64 machine running Ubuntu/Dapper, RMySQL 
v0.5-11 and DBI v0.2-3.

I'm really not sure what to do with this: I've tried updating all mysql 
Ubuntu packages, adding dev packages etc, to no avail. The database 
itself is functional and accessible.

I've also created a ~/.my.cnf file with appropriate entries, to no avail.

Any hints or comments most welcome.

Thanks

Chris

## Error Log ##

drv <- dbDriver("MySQL")
   Warning message:
   RS-DBI driver warning: (MySQL mismatch between compiled version 
5.0.19
   and runtime version 5.0.22)

dbConnect(drv=drv)
   Error in function (classes, fdef, mtable)  :
	unable to find an inherited method for function "dbConnect", for
         signature "MySQLDriver"

## End ##
#
Hi Chris,

The message seems to indicate a S4 dispatching error from the generic
function dbConnect when given a drv = "MySQLConnection" and not
with the mysql libraries themselves.   The idiom that you're using is widely
used, so I cannot see why it would fail, so I would try
(1)  what's the output of
     summary(drv, verbose = TRUE)
     (you should see a full description of the MySQLDriver object)
(2)  try other dbConnect methods, namely
      con <- dbConnect("MySQL")
      con <- dbConnect(MySQL())
(3) What do you see if you type
      getMethods("dbConnect")

Regards,

--
David
On 6/1/07, Chris Cotsapas <chrisc at chgr.mgh.harvard.edu> wrote:
1 day later
#
Hi David, thanks for your response:
David James wrote:
Error in function (classes, fdef, mtable)  :
         unable to find an inherited method for function "dbGetInfo",
for signatu re "MySQLDriver"
Error in function (classes, fdef, mtable)  :
         unable to find an inherited method for function "dbConnect",
for signatu re "character"
Error in function (classes, fdef, mtable)  :
         unable to find an inherited method for function "dbConnect",
for signatu re "MySQLDriver"
In addition: Warning message:
RS-DBI driver warning: (MySQL mismatch between compiled version 5.0.19
and runti me version 5.0.22)
An object of class ?MethodsList?
Slot "methods":
list()

Slot "argument":
drv

Slot "allMethods":
list()


This looks telling - there seem to be no methods associated with dbConnect?

Thanks!

Chris