Created
May 17, 2023 09:00
-
-
Save ssandra102/81a86f506c7553753fae3e6d61e39554 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include this library | |
library(RMySQL) | |
# to kill all the open connections at once | |
killDbConnections <- function () { | |
all_cons <- dbListConnections(MySQL()) | |
#print(all_cons) | |
for(con in all_cons) | |
+ dbDisconnect(con) | |
#print(paste(length(all_cons), " connections killed.")) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment