Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7950987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:25:45+00:00 2026-06-04T02:25:45+00:00

I am using PyMySQL-0.5.0 and facing an obscure’ish error/exception when loading data from a

  • 0

I am using PyMySQL-0.5.0 and facing an obscure’ish error/exception when loading data from a file to a remote MySQL instance. Upon executing a ‘load data local infile …’ statement, I am seeing an exception that says: The used command is not allowed with this MySQL version.

Any clues, if this operation is supported in PyMySQL at all(and/or if this is supported in some other version)

PS:

1) Error details:

2012-05-17 11:05:24,524 - 8988 - DEBUG - Loading table table_2012_05_16 
from file: /path/to/data/file_2012-05-16
2012-05-17 11:05:24,524 - 8988 - DEBUG - Executing update: load data local 
infile '/path/to/data/file_2012-05-16' into table table_2012_05_16(@dummy, c1, 
c2, c3, c4, c5, c6, c7);
2012-05-17 11:05:24,528 - 8988 - ERROR - Exception while executing update: 
<class 'pymysql.err.InternalError'> - (1148, u'The used command is not allowed 
with this MySQL version')

2) MySQL docs on the ‘load data local infile…’ support/syntax.

3) This data load works fine if I use the mysql client(i.e. IMHO there shouldn’t be any impediments – permissions, privileges, what-have-you – to this load):

load_machine:~$ mysql -htarget_machine.baz -ufoo -pbar db -e "load data local 
infile '/path/to/data/file_2012-05-16' into table table_2012_05_16(@dummy, c1, 
c2, c3, c4, c5, c6, c7)"

load_machine: ~$ mysql -htarget_machine.baz -ufoo -pbar db -e "select count(*) 
from table_2012_05_16;"
+----------+
| count(*) |
+----------+
| 38563191 |
+----------+
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T02:25:46+00:00Added an answer on June 4, 2026 at 2:25 am

    From the manual:

    If LOAD DATA LOCAL is disabled, either in the server or the client, a client that attempts to issue such a statement receives the following error message:

    ERROR 1148: The used command is not allowed with this MySQL version

    PyMySQL does not yet support LOAD DATA LOCAL. It has been a medium-priority defect on their bug tracker for over 10 months, nobody yet assigned to fix it, no milestone set.

    See this answer for how to perform a LOAD DATA LOCAL using Python’s MySQLdb instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using PHP, I can convert MySQL data or static table data to csv, Excel,
Using php/html, I want to retrieve email addresses (plus other information) from MySQL and
Using JAXB in Java it is easy to generate from a xml schema file
using (var file_stream = File.Create(users.xml)) { var serializer = new XmlSerializer(typeof(PasswordManager)); serializer.Serialize(file_stream, this); file_stream.Close();
i am inserting records to sql server from python using pymssql. The database takes
Using mercurial, I've run into an odd problem where a line from one committer
Using Android TelephonyManager an application can obtain the state of data activity over the
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Using C# and System.Data.SqlClient, is there a way to retrieve a list of parameters
Is possible to get ID for the row I inserted using pymysql? curr =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.