Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to import a large 70GB+ database (all InnoDB) using mysqlimport. This is a development system on Windows using WAMP server. MySQL 5.6.17.

I'm getting the following error:

mysqlimport: Error: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* WRITE' at line 1

Here's the command I'm trying to use:

mysqlimport -u root -p --lock-tables --debug-info --use-threads=4 testdb "C:\Users\Test User\Documents\Dump20140620_1642\*.sql"

I usually use MySQL Workbench to do the import but I wanted to use the use-threads parameter and I don't think MySQL Workbench does this. What's wrong with this syntax?

I also tried:

mysqlimport -u root -p --lock-tables --debug-info --use-threads=4 testdb "C:/Users/Test User/Documents/Dump20140620_1642/*.sql"

mysqlimport -u root -p --lock-tables --debug-info --use-threads=4 testdb 'C:\Users\Test User\Documents\Dump20140620_1642\*.sql'

mysqlimport -u root -p --lock-tables --debug-info --use-threads=4 testdb "C:\\Users\\Test User\\Documents\\Dump20140620_1642\\*.sql"

All gave the same error message.

share|improve this question

1 Answer 1

Have you tried to import these with any other tool? The error is in the SQL files. Check which file has * WRITE on its first line, and fix the file or remove it.

share|improve this answer
    
I have yeah.. it imports fine with MySQL Workbench (one table at a time). I've just looked inside the SQL and it looks like ALL the tables have the WRITE line: LOCK TABLES 'test_table' WRITE; /*!40000 ALTER TABLE 'test_table' DISABLE KEYS */; –  BT643 Jun 25 at 13:43
    
This doesn't look like the error message. The error message is explicitly about * WRITE, and there is no such sequence of characters in the line you quoted. –  Tero Kilkanen Jun 25 at 14:00
    
Do you know any way of getting mysqlimport to tell me which file it is in? We have nearly 900 tables to import, many of which are too large to open in a text editor on Windows! –  BT643 Jun 25 at 14:02
    
In Linux I would use grep '* WRITE' * command to search for the particular file. gnuwin32.sourceforge.net/packages/grep.htm has grep for Windows. –  Tero Kilkanen Jun 25 at 14:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.