[R] RMySQL Fail to connect on update to R 2.8.1

Zev Ross zev at zevross.com
Fri Jan 23 23:47:39 CET 2009


Hi,

I had my R to MySQL 5.0 connection working fine under 2.5.1 on Windows 
XP. My MySQL installation is local, not on a server and I could connect 
with:

con <- dbConnect(MySQL(), dbname = "mydatabase", user="root", password="XX")

I have updated to R 2.8.1 (RMySQL 0.7-2) but that same line of code yields:

Error in mysqlNewConnection(drv, ...) :
RS-DBI driver: (Failed to connect to database: Error: Access denied for 
user 'Â $5KÅ“'@'localhost' (using password: YES)

I have tried to follow the directions in the RMySQL.pdf whereby I 
created a file c:/my.cnf in which I have:

[client]
user = root
host = localhost
password=XX
database=mydatabase

And then use:

m<-dbDriver("MySQL")
con <- dbConnect(m,default.file="c:/my.cnf", group="client")

But I get:

Error in mysqlNewConnection(drv, ...) :
RS-DBI driver: (Failed to connect to database: Error: Access denied for 
user 'client'@'localhost' (using password: YES)

(Note that I did also have some trouble with installation of the library 
where I originally got warnings "MySQL is not installed according to a 
registry search" etc so perhaps the problems are partly related to the 
installation process)

Could a more savvy user than me give me some guidance?

Zev

-- 
Zev Ross
ZevRoss Spatial Analysis
120 N Aurora, Suite 3A
Ithaca, NY 14850
607-277-0004 (phone)
866-877-3690 (fax, toll-free)
zev at zevross.com




More information about the R-help mailing list