100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > R语言连接MySQL报错:could not run statement: The used command is not allowed with this MySQL version

R语言连接MySQL报错:could not run statement: The used command is not allowed with this MySQL version

时间:2019-05-17 13:44:00

相关推荐

R语言连接MySQL报错:could not run statement: The used command is not allowed with this MySQL version

版本说明

R版本:3.5

MySQL版本:8.0

RMySQL版本:0.10.19

情景说明:

使用RMySQL成功连接到MySQL数据库,可以进行查询操作,但在插入时报错,提示信息如下:

con <- dbConnect(MySQL(), host="127.0.0.1", dbname="epid", user="root", password="1234")dbWriteTable(con,"city_dt",city,overwrite =FALSE,append=TRUE,row.names=FALSE)

报错信息具体如下:

Error in .local(conn, statement, ...) : could not run statement: The used command is not allowed with this MySQL version

解决方法:

install.packages("RMariaDB")install.packages("zeallot")library(RMariaDB)library(zeallot)con <- dbConnect(MariaDB(), host="127.0.0.1", dbname="epid", user="root", password="1234")dbWriteTable(con,"city_dt",city,overwrite =FALSE,append=TRUE,row.names=FALSE)

数据成功插入数据库;

转载请注明:

博客会同步发布在我的微信公众号以及简书上,搜索“数据志”(原跟着菜鸟一起学R语言)关注我。

原文链接:/wheng/p/12316307.html

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。