3

I try use LOAD DATA LOCAL INFILE statement by mysqldb in python. I obtain follwing error. OperationalError: (1148, 'The used command is not allowed with this MySQL version')

and I set the option in mysql my.cnf file :

[mysqldump] quick

quote-names

max_allowed_packet = 16M

[mysql]

no-auto-rehash # faster start of mysql but no tab completition

local-infile=1

[isamchk]

key_buffer = 16M

but still not working :-(

Maybe I can use some statement in MySQLdb connect function like:

mysql --local-infile=1 -u username -p

Thanks for help Martin

Community
  • 1
  • 1
MartinP
  • 527
  • 5
  • 17
  • 1
    Duplicate of?: http://stackoverflow.com/questions/10762239/mysql-enable-load-data-local-infile – busse Sep 16 '14 at 15:55
  • I try this solutions but still not working. I put local-infile=1 under [mysql] and [mysqld] headers. I try this also with local-infile. My mysql version -5.5.38-0ubuntu0.12.04.1. – MartinP Sep 17 '14 at 07:41
  • Did you restart the MySQL server after modifying `my.cnf`? – Air Sep 30 '14 at 20:57

1 Answers1

3

Solved in MySQL LOAD DATA LOCAL INFILE Python

MySQLdb.connect(server, username, password, database, local_infile = 1)
Community
  • 1
  • 1
afakih
  • 345
  • 3
  • 8