I get this error message, when I want to run my python script on Debian 9.1. I am using MariaDB 10.1.
What is the problem here? How can I fix it?
My relevant sql code is here :
connection = MySQLdb.connect(host='localhost',
user='root',
passwd='1234',
db='database')
cursor = connection.cursor()
query = """ load data local infile 'MYOUTPUTLOCATION'
into table DEPARTURES
character set latin1
fields terminated by ';'
enclosed by '"'
lines terminated by '\r\n'
ignore 1 lines;
"""
cursor.execute(query)
connection.commit()
cursor.close()
As mentioned in the comments, The python client requires the native libraries. Resolve it by installing libmariadbclient18
on Debian 9.*.
On Debian 10 (Buster), the package is still available only as libmariadbclient-dev
.
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