‐‐‐ Original Message ‐‐‐
On Thursday, November 14, 2019 3:22 PM, Mike Bayer
wrote:
> that's the driver you're using which would not be allowing keyboard interrupt
> to go through.
>
> I just tried this with mysqlclient and pymysql and I would assume you're
> using mysqlclient as it
On Thu, Nov 14, 2019, at 3:24 AM, Marcin Koziej wrote:
> (Crossposting from Stackoverflow, where I unfortunately didn't get any
> answers:
> https://stackoverflow.com/questions/58837864/sqlalchemty-how-to-kill-a-mysql-process-on-keyboard-interrupt
> )
>
> Hello!
>
> I'm using SQLAlchemy
Wow! Thank You so much for pointing me these!
--
Marcin Koziej
GPG key: https://go.cahoots.pl/gpg/ Ϟ Twitter: @movonw
‐‐‐ Original Message ‐‐‐
On Thursday, November 14, 2019 2:31 PM, Simon King
wrote:
> For what it's worth, you can read how the mysql command line does it here:
>
>
For what it's worth, you can read how the mysql command line does it here:
https://github.com/mysql/mysql-server/blob/8.0/client/mysql.cc#L1484
On Thu, Nov 14, 2019 at 1:21 PM Simon King wrote:
>
> According to
>
According to
https://dev.mysql.com/doc/refman/8.0/en/information-functions.html#function_connection-id,
"SELECT connection_id()" should give you the answer.
Simon
On Thu, Nov 14, 2019 at 12:13 PM Marcin Koziej wrote:
>
> I don't know how to do this using other DBAPIs, but I thought that if
I don't know how to do this using other DBAPIs, but I thought that if command
line mysql client has such behaviour, it should be possible also using the
library.
I was thinking about finding the process in SHOW PROCESSLIST and killing it,
but it seems hacky and I am not sure if I can find the
I'm not sure this is even possible. Ignoring SQLAlchemy, do you know
how you would do it using any MySQL DBAPI library (mysqlclient,
PyMySQL, etc.)?
Maybe you could do something creative where you capture the PID when
the connection is created, and on Ctrl-C, send a "KILL pid" command. I
don't
(Crossposting from Stackoverflow, where I unfortunately didn't get any
answers:
https://stackoverflow.com/questions/58837864/sqlalchemty-how-to-kill-a-mysql-process-on-keyboard-interrupt
)
Hello!
I'm using SQLAlchemy 1.3.10 to run a bunch of SQL statements on Percona
Server 5.7.27. I do not