I encountered RMySQL issues recently, but ONLY when using 64 bit MySQL and
64 bit R 2.11.1

On my 32 bit machines, RMySQL works very well.

On my 64 bit machine, when using the 64 bit distribution of MySQL, the 32
bit R is not able to load the DLLs from the 64 bit distribution of MySQL,
and I can not find a 64 bit binary for RMySQL (or RPostgreSQL, and their TS
extensions).

It is not clear from Arijeet's message whether he encountered problems
because of unfamiliarity with normal use of RMySQL, or from being unable to
find the 64 bit binary distribution of RMySQL.  He doesn't say whether he is
running 64 bit or 32 bit MySQL.  In either case, the very first problem he'd
face is being able to get a 64 bit binary distribution of RMySQL.  That is
the problem I'm facing and which has me leaving all my R code that interacts
with MySQL running on my 32 bit machines until I find a solution (since a 64
bit windows binary will almost certainly be released at some point, I can
wait until that happens, relying on my 32 bit machines until then).  I fully
expected there'd be a delay between release of 64 bit R on Windows and the
availability of 64 bit binaries for some R packages

One of my colleagues encountered a similar problem trying to access 64 bit
MySQL from 32 bit R (on a 32 bit machine), and he resolved it by getting the
MySQL DLL required by RMySQL from the 32 bit version of MySQL with the same
version numbers as the 64 bit MySQL we are running on our server (and
telling R to use that for RMySQL).  But for 64 bit R, we need a 64 bit
binary of RMySQL and that I have not yet found (though conceivably it may
have been released since last I looked).

To take a solution to making/using a connection between R and MySQL a step
at a time, the first issue is how/where to get the 64 bit Windows binary for
RMySQL.  The next step, once that is installed, is how to use it, in which
case Spencer's answer suffices.

So, has a 64 bit windows binary been made?  If so, where can it be
obtained?  If there is such a distribution, then my current problem with
RMySQL will be solved, and Arijeet's may be solved.  If just being able to
install a 64 bit binary of RMySQL doesn't solve his problem, then he may
need a  more detailed elaboration of Spencer's answer.

Cheers,

Ted

On Fri, Sep 17, 2010 at 12:26 PM, Thomas Etheber <etheber@gmx.de> wrote:

> I also had problems connecting via RMysql on Windows several weeks ago.
> I decided to skip the package and now use RODBC, which runs stable out of
> the box. Perhaps you should have a look at this package.
>
> Hth
> Thomas
>
> Am 17.09.2010 17:50, schrieb Spencer Graves:
>
>
>>
>>      I've recently been through that with some success.  I don't remember
>> all the details, but I first looked at "help(pac=RMySQL)".   This told me
>> that the maintainer was Jeffrey Horner.  Google told me he was at
>> Vanderbilt.  Eventually I found "
>> http://biostat.mc.vanderbilt.edu/wiki/Main/RMySQL", which told me that I
>> needed to build the package myself so it matches your version of MySQL,
>> operating system, etc.  I did that.
>>
>>
>>      Does the MySQL database already exist?  I created a MySQL database
>> and tables using MySQL server 5.1.50-win32.  (Which version of MySQL do you
>> have?)
>>
>>
>>      help('RMySQL-package') includes "A typical usage".  That helped me
>> get started, except that I needed to write to that database, not just query
>> it.  For this, I think I got something like the following to work:
>>
>>
>> d <- dbReadTable(con, "WL")
>> dbWriteTable(con, "WL2", a.data.frame)  ## table from a data.frame
>> dbWriteTable(con, "test2", "~/data/test2.csv") ## table from a file
>>
>>
>>      Hope this helps.
>>      Spencer
>>
>>
>> On 9/17/2010 7:55 AM, Arijeet Mukherjee wrote:
>>
>>> I installed the RMySql package in R 2.11.1 64 bit
>>> Now how can I connect R with MySql?
>>> I am using a windows 7 64 bit version.
>>> Please help ASAP.
>>>
>>>
>>
>>
> ______________________________________________
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

	[[alternative HTML version deleted]]

