I've successfully installed InifiniDB on CENTOS 6.5. InfiniDB is a columnar DB "compatible" with MySQL (same port etc.: I've even managed to install the latest version of MySQLWorkbench and works has a charm with InifiniDB - believing to deal with just another install of MySQL).
The installation does not have MySQL as I don't need it :)
I tried to install RMySQL from RStudio Server, but I am unable to install: the installation expect to find a copy of MySQL somewhere and I do not have it.
See below the installation log. I put :/usr/local/Calpont/mysql/bin in my PATH, but this didn't have any effect.
Please consider that the inspiration for this comes from InfiniDB itself: see here http://infinidb.co/system/files/Calpont%20InfiniDB_Quick%20Start_for%20R.pdf I guess the main problem, comparing the error and the InfiniDB paper, is that they suggest to create the following global variables:
(From InfiniDB paper) RMySQL must be configured with the correct MySQL directory
(which comes with InfiniDB) and the developer library directory.
o Example in Ubuntu or CentOS:
export MYSQL_INC=”/usr/include/mysql/”
export MYSQL_LIB=”/usr/local/Calpont/mysql/lib/mysql”
But my installation on CENTOS does not have a mysql folder at /usr/include/mysql/.
Any suggestions?
==============
Installing package into ‘/usr/lib64/R/library’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/RMySQL_0.9-3.tar.gz'
Content type 'application/x-gzip' length 165363 bytes (161 Kb)
opened URL
==================================================
downloaded 161 Kb
* installing *source* package ‘RMySQL’ ...
** package ‘RMySQL’ successfully unpacked and MD5 sums checked
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for compress in -lz... yes
checking for getopt_long in -lc... yes
checking for mysql_init in -lmysqlclient... no
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking mysql.h usability... no
checking mysql.h presence... no
checking for mysql.h... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking /usr/local/include/mysql/mysql.h usability... no
checking /usr/local/include/mysql/mysql.h presence... no
checking for /usr/local/include/mysql/mysql.h... no
checking /usr/include/mysql/mysql.h usability... no
checking /usr/include/mysql/mysql.h presence... no
checking for /usr/include/mysql/mysql.h... no
checking /usr/local/mysql/include/mysql/mysql.h usability... no
checking /usr/local/mysql/include/mysql/mysql.h presence... no
checking for /usr/local/mysql/include/mysql/mysql.h... no
checking /opt/include/mysql/mysql.h usability... no
checking /opt/include/mysql/mysql.h presence... no
checking for /opt/include/mysql/mysql.h... no
checking /include/mysql/mysql.h usability... no
checking /include/mysql/mysql.h presence... no
checking for /include/mysql/mysql.h... no
Configuration error:
could not find the MySQL installation include and/or library
directories. Manually specify the location of the MySQL
libraries and the header files and re-run R CMD INSTALL.
INSTRUCTIONS:
1. Define and export the 2 shell variables PKG_CPPFLAGS and
PKG_LIBS to include the directory for header files (*.h)
and libraries, for example (using Bourne shell syntax):
export PKG_CPPFLAGS="-I<MySQL-include-dir>"
export PKG_LIBS="-L<MySQL-lib-dir> -lmysqlclient"
Re-run the R INSTALL command:
R CMD INSTALL RMySQL_<version>.tar.gz
2. Alternatively, you may pass the configure arguments
--with-mysql-dir=<base-dir> (distribution directory)
or
--with-mysql-inc=<base-inc> (where MySQL header files reside)
--with-mysql-lib=<base-lib> (where MySQL libraries reside)
in the call to R INSTALL --configure-args='...'
R CMD INSTALL --configure-args='--with-mysql-dir=DIR' RMySQL_<version>.tar.gz
ERROR: configuration failed for package ‘RMySQL’
* removing ‘/usr/lib64/R/library/RMySQL’
Warning in install.packages :
installation of package ‘RMySQL’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmpz2Q4Wl/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
I found a solution of sort.
First of all, my premise was to be able to use RMySQL with InfiniDB without adding a MySQL installation to the mix.
(As per wikipedia) "InfiniDB is accessed through a MySQL interface". A recent paper on InfiniDB website on R and InifiniDB ("R Statistical Computing Quick Start Guide") listed simple instructions to install and use InfiniDB in R with RMySQL without mentioning any pre-requisite.
I found this to be incorrect. Within my CENTOS installation I wasn't able to compile the RMySQL package. The missing mysql.h was preventing it.
The solution I found was to install mysql-devel with yum. Yum installed also mysql client programs and shared libraries as a dependency.
On the other hand the total install with yum was 3MB and I can still say I didn't need MySQL server installed (at least!) as RMySQL+InfiniDB need just the MySQL libraries to work.