-1

I am attempting to install the RMySQL package to connect to a MySQL database in R. I run RStudio in Windows on my local PC, with no local copy of MySQL. I would like to use RMySQL to query (but not update/delete or otherwise change) data on a MySQL database stored on external non-Windows server.

I know the location of the MySQL headers and library on the server, but unsure of how to point to them in the Renviron.site file stored in my R/etc/ directory.

Any suggestions?

http://biostat.mc.vanderbilt.edu/wiki/Main/RMySQL (RMySQL standard installation instructions)

  • are you sure that this RMySQL can be used with external server? from the wiki you pointed to, it does not look like so... – otterb Aug 12 '14 at 16:39
  • @otterb not entirely sure; basing my attempt in part off of this blog post: [link](http://gettinggeneticsdone.blogspot.com/2011/12/query-mysql-database-from-r-using.html) – user3402 Aug 12 '14 at 16:47

1 Answers1

0

if I understand correctly, you need a MySQL client to connect to the external server installed on your windows PC. As the wiki says:

Install a MySQL client library from http://www.mysql.com or http://dev.mysql.com

This package is a wrapper for the windows client in order to use it from inside R.

otterb
  • 2,660
  • 2
  • 29
  • 48
  • Thanks for clarifying. Any suggestion on how else to go about connecting to an external server installation of MySQL? Thanks. – user3402 Aug 13 '14 at 12:55
  • i only have little experience with oracle. but i guess after you use MySQL Installer from http://dev.mysql.com/downloads/windows/installer/, it will install **MySQL connector**, which has the driver that RMySQL needs. Then, you will just need to tell the server address, your login, password when RMySQL asked. Please try it and report what you get so others with more experience can help you. – otterb Aug 13 '14 at 13:42