[R] Database newbee problem...

Prof Brian D Ripley ripley at stats.ox.ac.uk
Wed Oct 16 11:42:48 CEST 2002


It's very hard to debug someone else's machine, not least when you haven't
even told us the OS you are using.  In general you need to get a symbolic
debugger (e.g. gdb) into use to investigate this sort of problem.

However, a version mismatch between the RMySQL compilation and the MySQL
installation has caused this for me.  Looks like the MySQL shared libraries
are not always compatible when their version numbers suggest they should
be, and after a MySQL upgrade I needed to reinstall RMySQL.

On Wed, 16 Oct 2002, Fredrik Karlsson wrote:

> Hi all,
>
>
> This is a potentially very stupid question about MySQL <-> R
> interaction, but I have not been able to solve it.
> I'm just trying to connect R to my MySQL databse, and gets this:
>
> > library(RMySQL)
> Loading required package: methods
> > m <- dbDriver("MySQL")
> > con <- dbConnect(m,group="testdb")
>
> Process R segmentation fault at Wed Oct 16 07:04:30 2002
>
> My .my.conf contains this:
>
> [client]
> user = zak
> host = localhost
> password=<something>
>
> [rs-dbi]
> database = sdata
>
> [testdb]
> host = localhost
> database = testDB
>
> and connecting through the mysql client is no problem using those
> settings:
>
> $ mysql
> Welcome to the MySQL monitor.  Commands end with ; or \g.
> Your MySQL connection id is 34 to server version: 3.23.49-log
>
> Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>
> mysql> use testDB
> Reading table information for completion of table and column names
> You can turn off this feature to get a quicker startup with -A
>
> Database changed
> mysql> show tables;
>
> +------------------+
> | Tables_in_testDB |
> +------------------+
> | pet              |
> +------------------+
> 1 row in set (0.00 sec)
>
> mysql>
>
>
> What's wrong with my setup that's causing R to segfault (but not mysql
> client)?
> Any ideas?
>
> /Fredrik
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list