[R] Disconnect all MySQL connections
Don MacQueen
macq at llnl.gov
Mon Mar 6 16:06:05 CET 2006
Use the function
dbListConnections()
to get a list of connections. Then use
dbDisconnect()
to disconnect them one by one.
Using Oracle as an example:
> dbm <- Oracle()
> dbDisconnect(dbListConnections(dbm)[[1]])
[1] TRUE
-Don
At 3:18 PM +0100 3/6/06, mailto-nik at bluemail.ch wrote:
>Hi
>
>I've got the error "cannot allocate a new connection -- maximum of
>16 connections
>already opened" after I tried to create a new connection to a
>database. However,
>the reason ist, that i did not disconnect previous connections....
>
>I don't know the name of this connections. How can I disconnect this "unknown"
>connections and drivers? if I delete all objects, the error still occurs.
>Exists a function which i don't know?
>
>Thanks a lot for your help.
>Regards
>Nik
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
--
--------------------------------------
Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA
More information about the R-help
mailing list