No, you enter that command at your shell prompt.

  mysql <mydb.sql

says, "launch the mysql client with input from mydb.sql." Add whatever options you need:

  mysql -u root -p dbname <mydb.sql

for example.

If you have already started the client (you're at the mysql prompt), then use the source command:

  mysql> source /Users/me/Desktop/database.sql;

This is explained in the manual <http://dev.mysql.com/doc/mysql/en/Batch_Commands.html>.

Michael


[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



[EMAIL PROTECTED] wrote:

Hi,
I dumped an entire db (using phpMyAdmin, MySQL 4.0.18)
I have a file now: mydb.sql
Again, this is the entire db.
Now I have recreated the db and all the tables, rows, etc.
All I need to do is to get the data (data only, db is built) that goes into those tables and rows from the file into the new db.
How?
Thank you very much.
Ted Rogers



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





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



Reply via email to