Tuesday, March 6, 2012

Frustration

Google has failed me.  Cannot get RMySQL to install on my laptop.  Looks like I am going to need a different method to get data from MySQL into R.

If anyone has pointers, I'm all ears.

Windows 7 x64, R 2.13.1

6 comments:

  1. Hm, maybe newer R version might help?

    ReplyDelete
  2. RODBC has never failed me.

    ReplyDelete
  3. +1 for RODBC (but ISTR that it was a bitch to get running the first time with getting the ODBC system drivers correctly configured).

    ReplyDelete
  4. RJDBC and java driver for MySQL is the way to handle it.
    (actually i stopped using native db interfaces in favor of rjdbc - much more convinient, although require java)

    ReplyDelete
  5. This works for me on a 2008 Windows Server.
    Create an ODBC connection to the MySQL db.

    library(RODBC)
    channel <- odbcConnect('connectionName')
    files <- sqlQuery(channel,
    "SELECT * FROM `db`.`tbl`"
    )
    odbcCloseAll()

    ReplyDelete
  6. RMySQL installation takes a lot of work in Windows.

    If you are still interested:
    http://stackoverflow.com/questions/4785933/adding-rmysql-package-to-r-fails

    ReplyDelete