Hello all,
Thanks to those who helped with my problem.
The problem posted to the list was as follows;
>I have been trying to use RMySQL but when I run the commands below I end up
with a segmentation fault
> Note I can access the MySQL database as any MySQL user.
>
> If I and running after logging in as root then running R, the following
works
>
> > library(RMySQL)
> > m <- dbDriver("MySQL")
> > con <-
dbConnect(m,host="acomputer",dbname="atable",user="au_ser",password="a_password")
> > rs <- dbSendQuery(con,statement="select * from flock")
> > data <- fetch(rs,n=-1)
>
> If I run the same code as a normal user the following line fails with a
segmentation fault
> con <-
dbConnect(m,host="acomputer",dbname="atable",user="au_ser",password="a_password")
>
> I have the following relevant software installed
> MySql 3.23.32
> R-1.7.0
> RMySQL 0.5.2
> Redhat 7.0
The problem was fixed by upgrading Development and Client MySQL Packages to
MySQL 4.0. (thanks to David James)
However the following fix was also suggested, and may be useful for people who
cannot upgrade the mysql client.
I had the same problem and after running RMySQL with strace and playing around a
bit, I found out, that - at least when using MySQL-client library 3.23.49 -
RMySQL crashes, if there is a .my.cnf in your ~home, which contains more than
just a plain [client]. The easiest workaround for me is just to rename or delete
the .my.cnf. Seems to be a bug in the mysql-client library and not in the RMySQL
package.(thanks to Holger Klein )