3

Is there an easy way to make data from a MySQL DB accessible via a web interface? Is there a package that will translate programmatic HTTP queries into CSV files?

I would like to make R scripts available to others in my lab, but the scripts depend upon data from a mySQL database. The barrier to entry for RMySQL is relatively high for the average Windows machine [download & install mysql client access, install the RTools package , install the source of RMySQL, test it and deal with the inevitable problems.]

Is there a package that will translate programmatic HTTP queries into CSV files? That way I can simply embed URLs in my R scripts to get the data without having to modify all the clients.

It looks like DBSlayer is one option. I thought of using PHPMyAdmin but that really seems to be meant for administrative tasks, not a database proxy.

Any common options out there?

Chris Warth
  • 890
  • 12
  • 26
  • 1
    You could run a Shiny app on a web server, which allows users to enter mysql queries and download the results in csv. – Rguy Jan 04 '13 at 02:39
  • 2
    Similarly, you could run RStudio Server on a Linux box, and have users access through a web interface. That way, they don't need to install any packages, but R will be setup all nice to access the database. Plus, if you put the server on the same machine as the database, you'll get a nice speed up. Also, average users tend to love RStudio. – nograpes Jan 04 '13 at 03:54
  • 1
    Also, you could try using `RODBC` instead of `RMySQL`. Maybe setting up the ODBC driver is a little less hassle than compiling the source? – nograpes Jan 04 '13 at 04:10
  • Thanks, I appreciate the comments, I just discovered Shiny a couple of days ago and I'm really excited about using it. That definitely is part of the longterm plan. That's a good idea, to have users access RStudio server, I'll try that. And I'll take a look at RODBC. – Chris Warth Jan 04 '13 at 06:46
  • I'd actually retract the Shiny idea, and go with the Rstudio one as @ChrisWarth suggested. The setup will be easier, and it will be faster and more versatile. – Rguy Jan 04 '13 at 17:37

1 Answers1

0

Just to move this question out of the Unanswered pile, I'm going to convert my comments to an answer.

You can run RStudio on a Linux box, and have users access through a web interface. It forces the users to use the RStudio interface, but it is a pretty nice interface, so maybe that isn't that bad.

You could also run RODBC instead of RMySQL. Setting up the ODBC driver can be a pain, but not as difficult as compiling a program from source on a Windows machine.

nograpes
  • 18,623
  • 1
  • 44
  • 67