Closed Thread Icon

Topic awaiting preservation: File redirection in windows Pages that link to <a href="https://ozoneasylum.com/backlink?for=11933" title="Pages that link to Topic awaiting preservation: File redirection in windows" rel="nofollow" >Topic awaiting preservation: File redirection in windows\

 
Author Thread
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