# NOTE: Edited since originally published due to a change in R...<br />require(RMySQL)<br />con <- dbConnect(MySQL(), username="{USERNAME}", host="localhost", dbname="{DATABASE}", password="{PASSWORD}", unix.sock="/Applications/MAMP/tmp/mysql/mysql.sock")<br />res <- code="" con="" dat="" dbsendquery="" fetch="" from="" res=""><br /></->
4 thoughts on “Connect R to a MAMP MySQL Database”
Post your thoughts
Comments are closed.
This has helped me greatly!! Thank you!
Thanks! For some reason I had to swap "MySQL" for MySQL(). Probably due to some change since 2011
Thanks for the comment and letting me know — I haven't tried it in some time!
Yeah thanks for the help =) the same remark, it should be MySQL() instead of "MySQL"