Showing posts with label mamp. Show all posts
Showing posts with label mamp. Show all posts

Friday, September 21, 2012

Connect R to a MAMP MySQL Database

# NOTE: Edited since originally published due to a change in R...
require(RMySQL)
con <- dbConnect(MySQL(), username="{USERNAME}", host="localhost", dbname="{DATABASE}", password="{PASSWORD}", unix.sock="/Applications/MAMP/tmp/mysql/mysql.sock")
res <- code="" con="" dat="" dbsendquery="" fetch="" from="" res="">