Displaying 20 results from an estimated 2000 matches similar to: "Test if mysql connection is alive"
2009 Jan 10
0
RMySQL CREATE TABLE error
Hi all-
I am stumped. The code in A. returns errors at lines 14 and 15 and fails
to load series1 and series2. However, in B., if temp1 and temp2 are
called again (which returns a "Table exists" error; see lines 14-17 in
B.) series1 and series2 load correctly. Any ideas? Also-I am open to any
suggestions to improve the code as I am a horrific programmer. Thanks
A.
1 >
2009 Mar 01
0
How to create temporary table in MySQL
Creating a temp table isn't completely intuitive with MySQL 5 and R
2.8..1, but it can be done.
> library(RMySQL)
Loading required package: DBI
> con <- dbConnect(dbDriver("MySQL"), dbname = "foo", user="me",password="secret")
> x<- data.frame(1:10)
> colnames(x) <-c("x")
> dbWriteTable(con, "#x", x,
2003 Nov 11
0
Installing and Loading RMySQL on OS X 2.8
Hello,
I have trouble installing and loading the RMySQL package on OS X 2.8.
The package seems to install from source fine (using R package manager
from within the R environment). I have the following error when I try
to load the package:
loading package: RMySQL
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library
2012 Mar 30
0
RMySQL and german umlaute
Hi list,
I have some trouble to setup RMySQL correctly to work with german umlaute:
> library(RMySQL)
Loading required package: DBI
> pg <- dbDriver("MySQL")
> con <- dbConnect(pg, username="dummy", host="localhost", password="",
dbname="ga1prosp")
> dbGetQuery(con, statement="SELECT * FROM K?rperma?e;")
Error in
2005 Mar 09
1
RMySQL installed but not availalable
I don't use MySQL but I have seen messages like this before. They often have replies which indicate that you need to follow the instructions more closely. I suggest you search the list for these previous posts as I'm sure there is help there, somewhere!
Tom
> -----Original Message-----
> From: Adriano von Sydow [mailto:pdasilva at xtra.co.nz]
> Sent: Thursday, 10 March 2005 5:13
2007 Mar 20
1
RMySQL load error
I'm having trouble getting RMySQL to load. I was able to build it and install
it (RMySQL_0.5-11.tar.gz). I was also able to build and install mysql-5.0.37.
I've read many postings about this but have not found a mention of my
particular problem (some closely related). I get the "unable to load shared
library, no such file" error, but all the files do exist, RMySQL.so and
2009 Feb 23
0
Segmentation Fault still exists
Hi All,
Sorry to bother everyone again.Ofcourse Prof Ripley ,Yihui and Uwe had
replied to my email.But this segmentation fault error was not solved.I agree
with Prof Ripley,as he said my R and all other configurations,are very
old.But what i don't understand is ,i was able to run analysis till few days
before,and why suddenly this error.
*The configuartions i use:---*
*R-version
*
*>
2011 Mar 16
0
Quantmod getSymbol.MySQL
I am trying to read a table from MySQL, I have loaded the file in "ts"
database, in table name ACC. but i am unable to read it in R through
getSymbol function.
mysql> show databases;
+--------------------------------+
| Database |
+--------------------------------+
| information_schema |
| mysql |
| test |
| ts
2004 Feb 10
0
name space conflict using RMySQL and ROracle
Hello everybody,
could anybody give me a hint how to to use RMySQL and ROracle libraries at the same
time without getting conflict with name spaces?
Because it needs to much time, unloading and reloading the libraries is no solution...
Example:
----------- snip -----------------
library(ROracle)
library(RMySQL)
mysql <- MySQL()
con <- dbConnect(mysql, user=MySQL.name, password=MySQL.pwd,
2002 Sep 12
1
DBI / MySQL problems
Hi.
I frequently use RMySQL package to interface R with MySQL databases. I was
having a try with package DBI and I got the following error:
> library(RMySQL)
> library(DBI)
> drv <- dbDriver("MySQL")
> ch <- dbConnect(drv, dbname="mydb", user="myuser", password="mypasswd")
> ibm <- dbGetQuery(ch,"select * from table where
2013 Feb 17
2
How to findout the name of a dataframe
Let'say we have a dataframe mydata with column v1. If mydata$v1 is passed
to a function, is there way, then, to extract the name of the dataframe?
What I now do is passing the name of the dataframe to the funcion, so
passing two parameters. Maybe with mydata$v1 it is not possible, but with
mydata['v1'] or mydata[,'v1'] it is?
Thanks
Frans
-------------------
Frans Marcelissen
2008 May 12
1
Insert a recorde into a table using SQL
Dear list,
I want to insert a recorde into a SQLite table by dbGetQuery(), but
there is a problem when the value contains quotation mark.
> dd<-data.frame(txt=c("having both ' and \" in character.","OK"))
> library(RSQLite)
Loading required package: DBI
> con<-dbConnect(dbDriver("SQLite"),":memory:")
>
2008 Aug 27
1
S4 coercion
I am extending a DBI connection by
setClass("TSPostgreSQLConnection",
contains=c("PostgreSQLConnection","TSdbOptions"))
but the first time I use this I am getting a warning when it tries to
coerce the TSPostgreSQLConnection to a PostgreSQLConnection. After the
first use the warning stops, but the first warning is causing me
problems when I do automatic checks
2009 Dec 30
1
seg-fault... but on what
I got the following after running succesfully through this loop 28 million
times... the loop opens text files in a directory and inserts line by line
into a database...
*** caught segfault ***
address 0xc0000010, cause 'memory not mapped'
Traceback:
1: .getGeneric(f, where, package)
2: getGeneric("coerce", where = where)
3: as(obj, "integer")
4:
2007 Jul 16
1
S4 coerce
(I am not sure if this is a bug or a request for a more understandable
warning, or possible something obvious I should be posting on r-help.)
I am trying to coerce an new class object to be a DBIConnection and it
does not work the way I think it should:
R version 2.5.1 (2007-06-27) ...
> require("RMySQL") # or require("RSQLite")
Loading required package: RMySQL
Loading
2007 Dec 13
1
RMySQL and free text variable
Hi all,
I have a quick question, I want to send a select statement to the
mysql server. With the code below I connect and ask my select statement.
As you can see from the code I want to have a mode = "+". The '+' needs
to be free text and hence the "\"" around it. But it doesn't work. If i
put just plus in instead of the 'mode' I get a table.
2011 Oct 19
4
Using SQL "IN" with RJDBC or RMySQL
Hello,
The code below works fine up until I try to use the "IN" statement in
the last line. The proper SQL format is:
SELECT * FROM this_table WHERE this_column IN (1,2,3,4,5)
But, I think I may be getting something like:
SELECT * FROM this_table WHERE this_column IN c(1,2,3,4,5)
Which makes no sense in SQL. I think it may be just a matter of string
massaging, but I'm not
2009 Mar 30
1
Importing csv file with character values into sqlite3 and subsequent problem in R / RSQLite
Dear all,
I'm trying to import a csv file into sqlite3 and from there into
R. Everything looks fine exepct that R outputs the character values in
an odd fashion: they are shown as "\"CHARACTER\"" instead of
"CHARACTER", but only if I show the character variable as a
vector. Does someone know why this happens? Below is a sample
code. The first part is written in
2011 Feb 16
1
Rjdbc dbGetquery execution error
Rjdbc consistently gives me an execution error with postgresql 9.0s JDBC4
driver. It's probably something trivial so am including my code below:
library("RJDBC")
param <- 249
param2 <- 188129
postgres <- JDBC("org.postgresql.Driver",
".m2/repository/postgresql/postgresql/9.0-801.jdbc4/postgresql-9.0-801.jdbc4.jar")
con <- dbConnect(postgres,
2005 May 02
2
RMySQL query: why result takes so much memory in R ?
Hi
I just started with RMySQL. I have a database with roughly 12 millions
rows/records and 8 columns/fields.
From all 12 millions of records I want to import 3 fields only.
The fields are specified as:id int(11), group char(15), measurement
float(4,2).
Why does this take > 1G RAM? I run R on suse linux, with 1G RAM and with
the code below it even fills the whole 1G of swap. I just