Home  >  Article  >  Database  >  Windows下RMySQL的安装和使用_MySQL

Windows下RMySQL的安装和使用_MySQL

WBOY
WBOYOriginal
2016-06-01 13:32:171158browse

bitsCN.com

Windows下RMySQL的安装和使用

 

   1.首先安装R,下载地址:http://ftp.ctex.org/mirrors/CRAN/bin/windows/base/

 

    2.安装R-tools, 下载地址:http://ftp.ctex.org/mirrors/CRAN/bin/windows/Rtools/

 

    3.安装MySQL (已安装的略过,本人装的是5.5版本)

 

    4.在R的安装目录下,在/etc目录下创建Renviron.site文件,用记事本打开,添加以下内容:

 

1

MYSQL_HOME=/MySQL/MySQLServer 5.5 (MySQL安装路径)

 

    5.在MySQL的目录下,在/lib目录下,找到libmysql.lib和libmysql.dll两个文件,复制到/lib/opt下(没有这个目录则新建),并把libmysql.dll复制到R安装目录/bin/i386下(32bit)或者 /bin/i386下(64bit)

    6.打开R-GUI ,输入以下内容:

 

1

install.packages("RMySQL",type="source")

 

完成安装!
 

bitsCN.com
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn