[R-sig-DB] problem loading RMySQL

Jeffrey Horner je||@horner @end|ng |rom v@nderb||t@edu
Wed Oct 28 17:28:56 CET 2009


尧 苏 wrote on 10/28/2009 10:42 AM:
> Hi Jeff:Â  I'd like to use the RMySQL package that you administer but am 
> having trouble loading it.  I can download and install the package but 
> can't load it.  Below is the output from my attempt.  I will appreciate 
> any help you can give me on this.   Thanks.
> The result of following codes are also attached:
> sessionInfo()
> .libPaths()
> Sys.getenv('MYSQL_HOME')
> utils::readRegistry("SOFTWARE\\MySQL AB", hive="HLM", maxdepth=2)
> 
>> utils:::menuInstallPkgs()
> --- Please select a CRAN mirror for use in this session ---
> also installing the dependency ‘DBI’
> trying URL 'http://ftp.ctex.org/mirrors/CRAN/bin/windows/contrib/2.10/DBI_0.2-4.zip'
> Content type 'application/zip' length 375508 bytes (366 Kb)
> opened URL
> downloaded 366 Kb
> trying URL 'http://ftp.ctex.org/mirrors/CRAN/bin/windows/contrib/2.10/RMySQL_0.7-4.zip'
> Content type 'application/zip' length 284408 bytes (277 Kb)
> opened URL
> downloaded 277 Kb
> package 'DBI' successfully unpacked and MD5 sums checked
> package 'RMySQL' successfully unpacked and MD5 sums checked
> The downloaded packages are in
> Â Â Â Â Â Â Â  C:\Documents and Settings\su\Local Settings\Temp\RtmpUPYJh5\downloaded_packages
>> library(RMySQL)
> Loading required package: DBI
> Error in if (utils::file_test("-d", MySQLhome)) break : 
> Â  argument is of length zero
> Error : .onLoad failed in 'loadNamespace' for 'RMySQL'
> Error: package/namespace load failed for 'RMySQL'
> 
>> sessionInfo()
> R version 2.10.0 (2009-10-26) 
> i386-pc-mingw32 
> locale:
> [1] LC_COLLATE=Chinese_People's Republic of China.936 
> [2] LC_CTYPE=Chinese_People's Republic of China.936Â Â  
> [3] LC_MONETARY=Chinese_People's Republic of China.936
> [4] LC_NUMERIC=CÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  
> [5] LC_TIME=Chinese_People's Republic of China.936Â Â Â  
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods  
> [7] base     
> other attached packages:
> [1] DBI_0.2-4Â Â  RODBC_1.3-1
> loaded via a namespace (and not attached):
> [1] tools_2.10.0
>> .libPaths()
> [1] "D:/PROGRA~1/R/R-210~1.0/library"
>> Sys.getenv('MYSQL_HOME')
> MYSQL_HOME 
> Â Â Â Â Â Â Â  "" 

You can see here that your MYSQL_HOME environment variable is set to an 
empty string. Did you intend to do this? If not, unset it and see if 
RMySQL will find the libmysql.dll from your registry settings.

Jeff

>> utils::readRegistry("SOFTWARE\\MySQL AB", hive="HLM", maxdepth=2)
> $`MySQL Connector/ODBC 5.1`
> $`MySQL Connector/ODBC 5.1`$Version
> [1] "5.1.5"
> 
> $`MySQL Server 5.1`
> $`MySQL Server 5.1`$DataLocation
> [1] "C:\\Documents and Settings\\All Users\\Application Data\\MySQL\\MySQL Server 5.1\\"
> $`MySQL Server 5.1`$FoundExistingDataDir
> [1] "0"
> $`MySQL Server 5.1`$Location
> [1] "D:\\MySQL\\"
> $`MySQL Server 5.1`$Version
> [1] "5.1.37"
> 
> 
> 
>       ___________________________________________________________ 
>   å¥½çŽ©è´ºå¡ç­‰ä½ å‘ï¼Œé‚®ç®±è´ºå¡å…¨æ–°ä¸Šçº¿ï¼ 
> http://card.mail.cn.yahoo.com/
> 	[[alternative HTML version deleted]]
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> R-sig-DB mailing list -- R Special Interest Group
> R-sig-DB using stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-db


-- 
http://biostat.mc.vanderbilt.edu/JeffreyHorner




More information about the R-sig-DB mailing list