* Matthew Stuart
> Right having just got to grips with the mysqldump command, I would like
> to be able to know how to import the database back in to MySQL should
> anything happen to my PC.
Good thinking. :)
> Does mysqlimport have to be done in the command line window like
> mysqldump, and if so, how?
Yes, but... you usually don't use mysqlimport to load a dumped database...
unless you used the 'fields-terminated-by' and so on for mysqldump?
mysqldump willl normally create SQL statements in the dump file. The
mysqlimport utility is used to import data from text files:
<URL: http://www.mysql.com/doc/en/mysqlimport.html >
To import a dump file, you simply feed it to the standard client from the
mysql mydb < dumpfile.sql
or use the "source" command from within the standard client:
mysql> source dumpfile.sql;
You may need to provide user name, password and/or host name when starting
the client, but I guess you are beyond that... :)
> It's just that I tried to import stating
> terminated, enclosed, escaped, etc and by the time I had come to list
> the db name to import in to and the path to the file I wish to import,
> the window wouldn't let me type anymore. Why? Did it get as bored as I
Yes, bad window... ;)
Was this a OS command line window or the mysql client window? I think
w95/w98 has a limited line buffer, you can just enter 180 or 255 characters
or something. I don't know, maybe you can have a longer line if you put it
in a batch file.
It could have been using the mysql client and LOAD DATA? The mysql client
also has a limited line buffer, but you can press enter every now and then,
i.e. split your input on multiple lines.
But I don't think you need LOAD DATA or mysqlimport.