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.
Tags: mysql
You can comment below, or link to this permanent URL from your own site.
August 23, 2006 at 12:10 pm
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…
August 23, 2006 at 12:59 pm
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 DUMPDIRshell> 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.
August 31, 2006 at 3:12 pm
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 .
http://storage-jobs.blogspot.com storage area network or SAN jobs