I have MySQL 4.0.14, MySQLdb 0.9.2 and Python 2.2 running on a win32 platform.
I need to upload from a data file into a table from inside a python script.
I use a code like this:
import MySQLdb
db=MySQLdb.connect(host='localhost',user='root',db='foo')
cr=db.cursor()
cr.execute("LOAD DATA LOCAL INFILE 'C:\\foo_prj\\foo_file.txt' INTO TABLE foo_tbl")
and I believe this is correct, but it comes out an OperationalError: n. 1148 "The used command is not allowed with this MySQL version"
When I get the MySQLdb.get_client_info() the answer is: '3.23.52'
when I get the db.get_server_info() the answer is:'4.0.14-nt'
I am a newbie in either programming, python and MySQL
Someone can help me, please?
Thank you
Francesco
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have MySQL 4.0.14, MySQLdb 0.9.2 and Python 2.2 running on a win32 platform.
I need to upload from a data file into a table from inside a python script.
I use a code like this:
import MySQLdb
db=MySQLdb.connect(host='localhost',user='root',db='foo')
cr=db.cursor()
cr.execute("LOAD DATA LOCAL INFILE 'C:\\foo_prj\\foo_file.txt' INTO TABLE foo_tbl")
and I believe this is correct, but it comes out an OperationalError: n. 1148 "The used command is not allowed with this MySQL version"
When I get the MySQLdb.get_client_info() the answer is: '3.23.52'
when I get the db.get_server_info() the answer is:'4.0.14-nt'
I am a newbie in either programming, python and MySQL
Someone can help me, please?
Thank you
Francesco