MySQLImport Error

Just a reminder note, when using mysqlimport and you are getting an Error 13 you then probably need to use the ‘-L’ (local) flag. It tells mysqlimport to load data from a local file.

Previous Post
Leave a comment


  1. I take it that you’re reloading from a mysqldump? I’ve never had luck using mysqlimport, maybe that’s why. I’ve always resorted to logging into a mysql shell and sourcing the export to reload my database. I’ll have to try the -L option next time I need to do it…

  2. Yes I was, in fact I was copy a 300 MB database to another machine. Once I found this trick it worked beautifully. It was really quick.

    Here is what I did (this is basically stolen right from the MySQL documentation)

    shell> mkdir DUMPDIR
    shell> mysqldump --tab=DUMPDIR db_name

    Then transfer the files in the DUMPDIR directory to a directory on the target machine and load the files into MySQL there:

    shell> mysqladmin create db_name # create database
    shell> cat DUMPDIR/*.sql | mysql db_name # create tables in database
    shell> mysqlimport -L db_name DUMPDIR/*.txt # load data into tables

    There was also a permission error, the import of the txt files is done by the mysql process not the user so the mysql account needs the correct permission to read the file, including the entire path down.

  3. Cool blog about all tech as well as general stuff. I read your blog regularly & follow with the updates frequently.please post more SAN or storage infrastructure information and all the troubleshooting involved. Its really great to know more about real world san case studies. We look forward for more posts on this blog . storage area network or SAN jobs

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: