/usr/lib/R/site-library/RMySQL/INSTALL is in r-cran-rmysql 0.9-3-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | $Id$
1. LINUX/MAC
Installation:
R CMD INSTALL [-l<alternate-dir>] RMySQL_<version>.tar.gz
During installation, RMySQL looks for the MySQL headers and libraries
in the system directories. If these are not installed in system-wide
directories (or if you want to use an alternate MySQL distribution),
you may specify which MySQL directory(ies) to use through one of the
following:
1. The shell variables PKG_CPPFLAGS and PKG_LIBS (using Bourne shell)
export PKG_CPPFLAGS="-I<include-dir>"
export PKG_LIBS="-L<library-dir> -lmysqlclient"
For instance, on some 64 systems (e.g., Linux) you may need to set
export PKG_CPPFALGS="-I/usr/include/mysql"
export PKG_LIBS="-L/usr/lib64/mysql -lmysqlclient"
or 2. Use the RMySQL configuration shell variables
export MYSQL_INC=<include directory>"
export MYSQL_LIB=<library directory>"
You may also specify the base directory (this is the directory
that has sub-directories "lib/mysql" and "include/mysql" directories)
export MYSQL_DIR="<base directory>"
or 3. Use the --with-mysql-* RMySQL configuration arguments
--with-mysql-dir=<base dir>
--with-mysql-inc=<include dir>
--with-mysql-lib=<library dir>
e.g.,
R CMD INSTALL --configure-args="--with-mysql-dir=$HOME/mysql" ...
Also, besure that RMySQL can find the non-system libraries at run-time. This is typically managed by an environment variable (LD_LIBRARY_PATH or DYLD_LIBRARY_PATH for OSX) or the /etc/ld.so.cache.
S/W Requirements:
-----------------
MySQL client library ("libmysqlclient.so") and header files
(see www.mysql.com). For Linux/intel you may use the binary rpms
client+devel+shared, and make sure you also have the header files,
they are *NOT* included in the following
MySQL-client-4.1.7-1.i386.rpm
MySQL-shared-4.1.7-1.i386.rpm
but they are included in the latest 4.1.7 rpm versions.
The library libz. This is a standard library on many (but not all)
systems. Under Red Hat, it's included in the rpm zlib-devel.
I've been told that on debian it's in the zlib1g-dev package.
Testing MySQL
-------------
This section is for users who wish to test RMySQL itself. Most users will
not need this.
To run tests in the tests directory, set MYSQL_USER, MYSQL_PASSWORD and
MYSQL_DATABASE, to appropriate values. If MYSQL_USER and MYSQL_PASSWORD are
missing then it assumes that user and password have been set in the MySQL
option files -- typically my.cnf (or my.cnf or my.ini on Windows) but see:
http://dev.mysql.com/doc/refman/5.1/en/option-files.html
If MYSQL_DATABASE is unspecified it defaults to "test".
2. WINDOWS
You need to have installed 'C Include Files / Lib Files' as part of your
MySQL installation when installing the MySQL binary distribution.
Then just set MYSQL_HOME to point to the top of the MySQL installation
and install via Rcmd INSTALL in the usual way.
(Note that when running MySQL, as opposed to installing it, do not need
to set MYSQL_HOME if its in a place it can find such as registry,
%ProgramFiles%\MySQL, C:\MySQL, C:\xampp\MySQL, C:\Apps\MySQL or the same
directories on other disks.)
e.g. assuming that MySQL is installed in the indicated location you might
enter this into the Windows command line (not into R):
set MYSQL_HOME=C:\\Program Files\\MySQL\\MySQL Server 5.1
R CMD INSTALL RMySQL_*.tar.gz
where RMySQL_*.tar.gz is replaced with the source tar.gz file name.
Note that unless you have MySQL in a non-standard place you only need to
set MYSQL_HOME while installing it but not for running it. If its in a
non-standard place where it can't find it then MYSQL_HOME should be set to
run RMySQL as well.
Also see the Testing MySQL under Linux/Mac above if you wish to test
RMySQL itself.
|