Sorry mistake from me. This was another problem in my mind , but with RMySQL. Christian > library(RMySQL) > library(sqldf) > sqldf("Select * from mtcars") Fehler in mysqlNewConnection(drv, ...) : RS-DBI driver: (Failed to connect to database: Error: Access denied for user 'user'@'localhost' (using password: NO) ) Fehler in if (dbname == ":memory:") dbDisconnect(connection) else if (!dbPreExists && : Argument hat L?nge 0 > detach("package:RMySQL") > sqldf("Select * from mtcars") mpg cyl disp hp drat wt qsec vs am gear carb 1 21.0 6 160.0 110 3.90 2.620 16.46 0 1 4 4 2 21.0 6 160.0 110 3.90 2.875 17.02 0 1 4 4 3 22.8 4 108.0 93 3.85 2.320 18.61 1 1 4 1 4 21.4 6 258.0 110 3.08 3.215 19.44 1 0 3 1 5 18.7 8 360.0 175 3.15 3.440 17.02 0 0 3 2 ..................... -------------- next part -------------- An embedded message was scrubbed... From: Christian Schulz <chschulz at email.de> Subject: Re: [R] question on sqldf syntax Date: Tue, 26 Jan 2010 10:34:54 +0100 Size: 1577 URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100126/b2738483/attachment.eml>
On 1/26/10 2:11 AM, Christian Schulz wrote:> Sorry mistake from me. This was another problem in my mind , but with > RMySQL. > Christian > > > library(RMySQL) > > library(sqldf) > > sqldf("Select * from mtcars") > Fehler in mysqlNewConnection(drv, ...) : > RS-DBI driver: (Failed to connect to database: Error: Access denied for > user 'user'@'localhost' (using password: NO) > ) > Fehler in if (dbname == ":memory:") dbDisconnect(connection) else if > (!dbPreExists && : > Argument hat L?nge 0 > > detach("package:RMySQL") > > sqldf("Select * from mtcars")That sqldf only works if RMySQL is not attached seems like something worth investigating and fixing. It should be possible to avoid such conflicts by proper use of name spaces, but I have not looked into the details of what's going on. + seth -- Seth Falcon | @sfalcon | http://userprimary.net/user