I'm looking for a mysql_info() equivalent in Python.
My script executes a LOAD DATA LOCAL INFILE statement and I would like to have information like this : Records: 3 Duplicates: 0 Warnings: 0.
I looked inside the Connector/Python API Reference but I didn't found anything.
Is there a way to get that information ?
Connector/Python does not have a method directly showing the required info, but you can in a way(not a good way) get the required info.
conn = mysql.connector.connect(...)
result = conn.cmd_query("LOAD DATA LOCAL INFILE query")
print (result['info_msg'])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With