Questions tagged [rmysql]

An R package for interfacing with MySQL and MariaDB databases.

RMySQL is an package providing an interface to and databases. RMySQL uses the interface which is also used by the packages , , , and .

Repositories

Other resources

Related tags

418 questions
0
votes
1 answer

Output the mysql query results in rmarkdown

I am getting crazy because I have written a sql query under the RMySQL package in a rmarkdown document and I dont get the output of the query in the document, but yes in the code editor. I want to know how to get the output in the my document. I…
0
votes
0 answers

Error message with the RMySQL package

Windows 10 R v 3.3.2 Package "RMySQL" When I want to access the fields of a table in a data base with this command: > dbListFields(hg19,"affyU133PLus2") I get this information : Error in .local(conn, statement, ...) : could not run statement: …
MadMed
  • 36
  • 8
0
votes
2 answers

How to check a condition whether table exist or not in RMysql

I want to check a condition in Shiny app whether mysql table exist or not in specific databse. If table does not exist it should return a null value. Here is my code looking like. loadData <- function(){ db <- dbConnect(MySQL(), dbname =…
Neil
  • 7,937
  • 22
  • 87
  • 145
0
votes
0 answers

error while uploading csv file to mysql database from RMysql package

I am developing a shiny app where user can upload a csv file and then it will be pushed to mysql database. I am using RMysql package for doing this task. db <- dbConnect(MySQL(), dbname = databaseName, host = host, port = port, user…
Neil
  • 7,937
  • 22
  • 87
  • 145
0
votes
0 answers

can't connect to MySql database with Rmysql

I am trying to connect to MySql database using RMysql (R version 3.3.1.). My code is: mydb <- dbConnect(MySQL(), user='odvjet12_mislav', password='xxxxx', host='odvjetnistvo-sagovac.hr') I think I am entering wrong parameters: user - is it a user…
Mislav
  • 1,533
  • 16
  • 37
0
votes
0 answers

Error Connecting to MySQL server using RMySQL

I am getting the following error when I try to connect to a MySQL database using RMySQL package. I am trying to connect to a host and not my local system. The previous discussion posted with this link is on a local host Failed to connect to…
nityansh seth
  • 31
  • 2
  • 9
0
votes
1 answer

How to enter apostrophe (') into mysql database in R shiny?

A ui.R library(shiny) library(shinyjs) shinyUI(fluidPage( bootstrapPage( ) ) ) Server.R library(shiny) library(shinyjs) mydb=dbConnect(MySQL(),user='',password='123',dbname='test1',host='localhost') shinyServer(function(input,…
Rad
  • 59
  • 1
  • 8
0
votes
1 answer

SQL query contains 'c(' when being generated from rmysql

I am using the library RMySQL to generate an SQL statement query <- sprintf("foo", paste(mydf, collapse = "', '",sep = ',')) When i have a look at the query it seems to be putting everything in brackets for example a column would consist of monatory…
John Smith
  • 2,448
  • 7
  • 54
  • 78
0
votes
1 answer

Access denied for user: (using password: NO) when running sqldf command -- R 3.2.1, Ubuntu 14.04

I am trying to run sqldf in R in Rstudio. However, it produced an error asking for a password even when a password was given (shown in box 1). I made sure that my password was OK by typing mysql -u scottyiu -p into the terminal and then my password.…
Scott Yiu
  • 31
  • 1
  • 3
0
votes
1 answer

How combine dbSendQuery with values from DataFrame in R?

I'm looking for a way to include data from an R dataframe in a sql predicate. Ideally, I'd like to use dbSendQuery from the RMySQL package to send a query to my database that contains a WHERE ... IN conditions that includes values from my database.…
gr1zzly be4r
  • 2,072
  • 1
  • 18
  • 33
0
votes
1 answer

RMySQL dbWriteTable only import the first line?

I have a 80 * 5 data.frame df using dbWriteTable(mydb, name = "fooDB", df, field.types = dbtypes, row.names = FALSE, append = TRUE) to import to MySQL database. However, it only imports the first row of df. Does anyone have similar problem? Or…
Bin Hao
  • 61
  • 7
0
votes
1 answer

R - connecting to remote mysql server

I am trying to connect in R to remote mysql server, but without success. That is my code - library(RMySQL) drv = dbDriver("MySQL") mydb = dbConnect(drv,host="*.*.*.*",dbname="dbname",user="user",pass="pass") but I get the following error -…
dima_mak
  • 184
  • 1
  • 1
  • 10
0
votes
1 answer

RMySQL does not work as part of a script

When I run library(RMySQL) mydb = dbConnect(MySQL(), user = "XX", password = "XX", dbname = "XX", host = "XX") on the R console it works, however when I put save it as a yy.R file and run it as R CMD BATCH yy.R, or as source("yy.R") it says…
user3847136
  • 47
  • 1
  • 6
0
votes
1 answer

Writing financial data to database using Rblpapi and RMySQL

I used Rblpapi to retrieve historic data, format is a list of data.frames. I now want to write that list of data into a MySQL database, I tried dbWriteTable(con,name="db_all",data,header=T), which gives me "unable to find an inherited method for…
Luke
  • 43
  • 1
  • 4
0
votes
0 answers

Error in Inserting R Dataframe into MySQL

Need help in inserting data into MySQL using R. I am getting the following error and do not know how to fix this: Error: C stack usage 7971984 is too close to the limit This is not a memory allocation problem, as I have tried inserting a much…
Arshad Islam
  • 107
  • 1
  • 1
  • 10