Don't do it from within mysql. Do it from your shell prompt.

[EMAIL PROTECTED] directoy]$mysql -p database < database.sql

"-p" is used for prompting for a password. You only need it if you need a password. "<" means to redirect the sql file as input to the mysql command. "database" is the actual name of the database.

Mike



[EMAIL PROTECTED] wrote:

I get:

mysql> -p database < /Users/me/Desktop/database.sql;
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 '-p database < /Users/me/Desktop/database.sql' at line 1


Thanks,
TR



On Aug 22, 2004, at 6:09 PM, Michael J. Pawlowsky wrote:

Generally it's just sql.

The easiest way would be from a command line on the server.

mysql -p dbname < mydb.sql


Cheers, Mike



-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to