[R-sig-DB] RMySQL error under Windows Server 2008 64-bit
mstyer at stanford.edu
Fri Dec 19 21:17:33 CET 2008
Michael Styer wrote:
> Prof Brian Ripley wrote:
>> On Fri, 19 Dec 2008, Michael Styer wrote:
>>> Michael Styer wrote:
>>>> Prof Brian Ripley wrote:
>>>>> Are you running R on that server?
>>>> Yes, it's all happening on the same server.
>>>>> If not (the most likely answer), you need MySQL on the client.
>>>>> If yes, I think you need 32-bit MySQL for RMySQL, even with a
>>>>> 64-bit server, since R for Windows is 32-bit. But I've not seen a
>>>>> 64-bit Windows install of MySQL.
>>>> That's interesting. It doesn't seem to be reaching an
>>>> incompatibility with the version of MySQL, though. The installation
>>>> routine for RMySQL doesn't seem to be able to find the MySQL
>>>> installation at all, so I was trying to figure out how to make sure
>>>> it at least found the installation.
>>> OK, some further results. I set MYSQL_HOME="C:/Program
>>> Files/MySQL/MySQL Server 5.0". Sys.getenv("MYSQL_HOME") was escaping
>>> the double-backslashes in the value I used before.
>>> Now RMySQL is able to find the installation, but I think we do run
>>> into an incompatibility with 64-bit MySQL at this point. Trying to
>>> load the RMySQL library I get this error:
>>> > library("RMySQL")
>>> Loading required package: DBI
>>> Error in inDL(x, as.logical(local), as.logical(now), ...) :
>>> unable to load shared library
>>> LoadLibrary failure: %1 is not a valid Win32 application.
>>> In addition: Warning message:
>>> package 'RMySQL' was built under R version 2.8.1
>>> Error : .onLoad failed in 'loadNamespace' for 'RMySQL'
>>> Error: package/namespace load failed for 'RMySQL'
>>> The file RMySQL.dll does exist in that location, but it fails to
>>> load. This is beyond my knowledge; would that be because it needs a
>>> 32-bit version of MySQL to load correctly?
>> Yes, it does. A 64-bit installation should not be under Program Files
>> (at least on the systems I've seen), so install a 32-bit application
>> somewhere else.
> OK, thanks. This is the first 64-bit Windows machine I've worked with
> myself. It seems to install 64-bit apps in Program Files and 32-bit apps
> in Program Files (x86).
> I'm downloading the 32-bit version as we speak; I'll try installing that
> and pointing R to that installation.
And that works. At least, RMySQL loads; I'm not sure what limitations
there are when using a 32-bit MySQL client with a 64-bit server, but
that's a question for a different list.
Thank you for your assistance.
More information about the R-sig-DB