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

401 questions
26
votes
3 answers

Cannot allocate a new connection: 16 connections already opened RMySQL

I am very new to shiny and R but using shiny I am trying to connect to a database fetch the data from there. When I try to access my RShiny work on browser continuously I got an error like Cannot allocate a new connection: 16 connections already…
anoop
  • 1,536
  • 6
  • 21
  • 45
24
votes
2 answers

RMySQL dbWriteTable with field.types

I have a data frame, called df, that looks like this: dte, val 2012-01-01, 23.2323 2012-01-02, 34.343 The type on the columns is date and numeric. I would like to write this to a MySQL database using an already open connection. The connection…
Alex
  • 17,745
  • 33
  • 112
  • 182
20
votes
2 answers

Fastest way to subset - data.table vs. MySQL

I'm an R user, and I frequently find that I need to write functions that require subsetting large datasets (10s of millions of rows). When I apply such functions over a large number of observations, it can get very time consuming if I'm not careful…
exl
  • 1,493
  • 2
  • 15
  • 25
19
votes
6 answers

Is there a package for object-relational mapping in R?

(By object-relational mapping, I mean what is described here: Wikipedia: Object-relational mapping.) Here is how I could imagine this work in R : a kind of "virtual data frame" is linked to a database, and returns the results of SQL queries when…
nassimhddd
  • 7,841
  • 1
  • 24
  • 41
15
votes
5 answers

Error installing RMySQL (MySQL 5.5.37 in Ubuntu 14.04 )

Every time I try installing RMySQL I get the following error: Installing package into ‘/home/ehsan/R/x86_64-pc-linux-gnu-library/3.0’ (as ‘lib’ is unspecified) * installing *source* package ‘RMySQL’ ... ** package ‘RMySQL’ successfully unpacked and…
Ehsan M. Kermani
  • 842
  • 1
  • 11
  • 25
13
votes
1 answer

Can't connect to local MySQL server through socket error when using SSH tunel

I am trying to use dplyr to connect to a remote database, that I usually query through a ssh tunnel. I first set up a ssh tunnel like the following: alias tunnel_ncg='ssh -fNg -L 3307:127.0.0.1:3306 mysqluser@myhost mysql5 -h 127.0.0.1:3306 -P 3307…
dalloliogm
  • 7,737
  • 5
  • 40
  • 55
12
votes
3 answers

Connect to MySQL database with RMySQL

I am making the move from RSQLite to RMySQL and I am confused by the user and password fields. FWIW, I'm running Windows 7, R 2.12.2, MySQL 5.5 (all 64 bit), and RMySQL 0.7-5. I installed RMySQL as prescribed in this previous SO question, and as…
Richard Herron
  • 8,979
  • 10
  • 62
  • 104
10
votes
2 answers

Handling field types in database interaction with R

I use RMySQL and a MySQL database to store my datasets. Sometimes data gets revised or I store results back to the database as well. Long story short, there is quite some interaction between R and the database in my use case. Most of the time I use…
Matt Bannert
  • 25,237
  • 34
  • 134
  • 195
9
votes
2 answers

How to connect R to MySQL? Failed to connect to database: Error: Plugin caching_sha2_password could not be loaded

I recently installed MySQL on my computer and am trying to connect RStudio to MySQL. I followed instructions in a book as well as instructions here. However, whenever I use dbConnect() or src_mysql in RStudio, I get this error message: Error in…
Phil
  • 398
  • 2
  • 6
  • 14
9
votes
11 answers

adding RMySQL package to R fails (on Windows)?

I can't figure out why my RMySQL package won't install - here's what I get: > install.packages('RMySQL',type='source') trying URL 'http://cran.mirrors.hoobly.com/src/contrib/RMySQL_0.7-5.tar.gz' Content type 'application/x-gzip' length 160769 bytes…
Andrew
  • 8,441
  • 8
  • 41
  • 57
9
votes
3 answers

RMySQL system error: 10060

I have a project with a connection that was working properly on the same device. I suddenly got the error below. And I could connect from the same device through MySQL workbench. What could be the reason? library(RMySQL) con <-…
OmaymaS
  • 1,321
  • 9
  • 18
9
votes
3 answers

MySQL stored procedure fails when called from R

This procedure works from the MySQL commandline both remotely and on localhost and it works when called from PHP. In all cases the grants are adequate: CREATE PROCEDURE `myDB`.`lee_expout` (IN e int, IN g int) BEGIN select lm.groupname,…
dnagirl
  • 19,254
  • 12
  • 74
  • 113
9
votes
2 answers

Error installing RMySQL on OS X

I'm running into an issue installing the RMySQL package on OS X. Package installation seems to work, but when package loading is tested, it invariably fails: * installing *source* package ‘RMySQL’ ... . .(omitted for brevity. see the gist linked…
yoni
  • 4,877
  • 2
  • 24
  • 27
8
votes
1 answer

Execute multiple SQL commands at once on R

I am using RMySQL and DBI for the connection between R and MySQL library(RMySQL) library(DBI, quietly = TRUE) Everything is working fine for one command, such as sql = "select * from clients" con <- dbConnect(MySQL(),user=user, password=password,…
Duy Bui
  • 1,085
  • 5
  • 14
  • 27
8
votes
2 answers

R shiny - pop up window with options

Im creating a shiny app that queries an SQL database. I want to warn the user if the queried data has entries on two dates. Moreover, I want the user to be able to select which set of data to query. Here is an example: Server # Create example…
Pete900
  • 1,714
  • 1
  • 16
  • 33
1
2 3
26 27