From: Arno Ouwehand <arno at stat.ucla.edu>
Date: Wed Jul 3, 2002 16:00:54 America/Los_Angeles
To: fernando.pineda at jhu.edu
Cc: deleeuw at stat.ucla.edu
Subject: RMySQL and Mac OS X
I got it working, initially I had the same problem (using R1.5.0 and Mysql-3.23.49 )
Then I installed the R 1.5.1 MetaPackage from http://cran.stat.ucla.edu/bin/macosx/ and
MySQL 3.23.51 from www.entropy.ch and RMySQL using the following command:
sudo R CMD INSTALL --configure-args='--with-mysql-
lib=/usr/local/mysql/lib --with-mysql-inc=/usr/local/mysql/include' RMySQL_0.4-6.tar.gz
Then in R:
library(RMySQL)
m <- MySQL()
describe (m)
<MySQLManager:(1924)>
Driver name: MySQL
Max connections: 10
Conn. processed: 0
Default records per fetch: 500
Open connections: 0
c <- dbConnect(m, dbname = "r", user="xxx", password="xxx")
describe(m)
<MySQLManager:(1924)>
Driver name: MySQL
Max connections: 10
Conn. processed: 1
Default records per fetch: 500
Open connections: 1
s <- dbExecStatement(c, "select * from user")
data <- fetch(s, n = -1)
print (data)
etc.
Sincerely,
Arno Ouwehand
UCLA Department of Statistics
p.s. Jan, maybe you could submit this to the r-help mailinglist