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 9040389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T09:58:14+00:00 2026-06-16T09:58:14+00:00

Using MySQL I cannot import a file using load data local infile. My server

  • 0

Using MySQL I cannot import a file using load data local infile. My server is on AWS RDS. This works on Ubuntu 10.04. I installed the client using apt-get install mysql-client. Same error if I use mysqldb or mysql.connector in Python.

  File "/usr/lib/pymodules/python2.7/mysql/connector/protocol.py", line 479, in cmd_query
    return self.handle_cmd_result(self.conn.recv())
  File "/usr/lib/pymodules/python2.7/mysql/connector/connection.py", line 179, in recv_plain
    errors.raise_error(buf)
  File "/usr/lib/pymodules/python2.7/mysql/connector/errors.py", line 82, in raise_error
    raise get_mysql_exception(errno,errmsg)
mysql.connector.errors.NotSupportedError: 1148: The used command is not allowed with this MySQL version

I have a lot of data to upload… I can’t believe 12.04 is not supported and I have to use 12.04.

  • 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-16T09:58:15+00:00Added an answer on June 16, 2026 at 9:58 am

    Not really a python question… but the long and short of the matter is that mysql, as compiled and distributed by Ubuntu > 12.04, does not support using load data local infile directly from the mysql client as is.

    If you search the MySQL Reference Documentation for Error 1148, further down the page linked above, in the comments:

    Posted by Aaron Peterson on November 9 2005 4:35pm

    With a defalut installation from FreeBSD ports, I had to use the command line
    mysql -u user -p –local-infile menagerie
    to start the mysql monitor, else the LOAD DATA LOCAL command failed with an error like
    the following:

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

    … which does work.

    monte@oobun2:~$ mysql -h localhost -u monte -p monte --local-infile
    Enter password: 
    
    ...
    
    mysql> LOAD DATA LOCAL INFILE 'pet.txt' INTO TABLE pet;
    Query OK, 8 rows affected (0.04 sec)
    Records: 8  Deleted: 0  Skipped: 0  Warnings: 0
    
    mysql> SELECT * FROM pet;
    +----------+--------+---------+------+------------+------------+
    | name     | owner  | species | sex  | birth      | death      |
    +----------+--------+---------+------+------------+------------+
    | Fluffy   | Harold | cat     | f    | 1993-02-04 | NULL       |
    | Claws    | Gwen   | cat     | m    | 1994-03-17 | NULL       |
    | Buffy    | Harold | dog     | f    | 1989-05-13 | NULL       |
    | Fang     | Benny  | dog     | m    | 1990-08-27 | NULL       |
    | Bowser   | Diane  | dog     | m    | 1979-08-31 | 1995-07-29 |
    | Chirpy   | Gwen   | bird    | f    | 1998-09-11 | NULL       |
    | Whistler | Gwen   | bird    | NULL | 1997-12-09 | NULL       |
    | Slim     | Benny  | snake   | m    | 1996-04-29 | NULL       |
    | Puffball | Diane  | hamster | f    | 1999-03-30 | NULL       |
    +----------+--------+---------+------+------------+------------+
    9 rows in set (0.00 sec)
    
    mysql>
    

    I generally don’t need to load data via code, so that suffices for my needs. If you do, and have the ability/permissions to edit your mysql config file, then the local-infile=1 line in the appropriate section(s) may be simpler.

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

Sidebar

Related Questions

I am trying to load the data using LOAD DATA LOCAL INFILE but MySql
I'm using following code but cannot return data from MySQL. This is the output:
I am trying to import multiple tables from a MySQL database using Solr's Data
This is using MySQL 5.5. I cannot seem to convince MySQL to use indexes
I am trying to load a CSV file in to mySQL database using Java+Hibernate+Spring.
my Mysql cannot connect remotly,it will give error 2003. I am using Ubuntu 11.04,
Using MySQL should I store time data as an Int which would be the
Using MySQL, How do I import a user defined database function from one db
Currently using MySQL version 5.1.6 This is my first real world build and so
I have a setup where I have a MySQL DB using Amazon's RDS (version

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.