I'm trying to import a .sql file that was dumped from one server and import it into an empty database on a windows dev box running XAMPP.
Normally, I would use phpmyadmin, but the file is 300+ MB in size.
The create statements and insert statements are all there.
Going to the command line, I can get to the mysqlimport bin file, but every time I try typing in the command for the actual import, it spits back the text of the help file like I missed something in the command's syntax.
I copied the .sql file into the bin directory to eliminate issues I might have been having with the filepath.
Here's what I've attempted:
mysqlimport -u THEUSER -p THEPASSWORD THEDATABASENAME THEFILE.sql
mysqlimport -u THEUSER -p THEPASSWORD THEDATABASENAME < THEFILE.sql
Any ideas as to what's missing or incorrect?
Looks like I was using the -u and -p options incorrectly. New command, and a new error:
mysqlimport --user=THEUSER -p THEDBNAME THEFILE.sql
mysqlimport: Error: 1146, Table 'THEDBNAME.THEDBNAME' doesn't exist, when using table: THEDBNAME
Suggestions brought up in google say to include an angle bracket:
mysqlimport --user=THEUSER -p THEDBNAME < THEFILE.sql
But this just produces the help file output again like there's a syntax error.
mysql --user=THEUSER -p THEDBNAME < THEFILE.sql