Closed Thread Icon

Topic awaiting preservation: File redirection in windows (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=11933" title="Pages that link to Topic awaiting preservation: File redirection in windows (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: File redirection in windows <span class="small">(Page 1 of 1)</span>\

 
butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 12-01-2001 00:42

I'm trying to populate a MySQL database with a .sql file using a file redirect like so:

>mysql -h localhost -u username databasename -p < myfile.sql

all I keep getting is a run of the help options for MySQL. Is there something obvious I'm missing?

Thanks for your suggestions.

-Butcher-

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 12-01-2001 00:59

"databasename" parameter should go after "-p" parameter, like this:

mysql -h localhost -u username -p databasename < myfile.sql


butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 12-01-2001 01:55

Thanks mr.maX!

-Butcher-

« BackwardsOnwards »

Show Forum Drop Down Menu