0

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.

BT643
  • 551
  • 3
  • 9
  • 21

1 Answers1

0

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.

Tero Kilkanen
  • 34,499
  • 3
  • 38
  • 58
  • 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 '14 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 '14 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 '14 at 14:02
  • In Linux I would use `grep '* WRITE' *` command to search for the particular file. http://gnuwin32.sourceforge.net/packages/grep.htm has grep for Windows. – Tero Kilkanen Jun 25 '14 at 14:48