At 14:52 +1000 6/8/03, JeRRy wrote:
Hi,

I have a text file with all my database information to
create databases to setting up tables.  I have looked
throught the mysql docs onto how to load these on from
the mysql prompt.  But all I can find is:

load data infile "filename.txt" into table whatever

But this is not what I am looking for. :(  As the
tables are already defined in the text file and the
appropiate database name to enter them into.

Is there a way to load these into the database
directly instead of doing each table seperately from
the mysql prompt? (not web admin)

Thanks in advance.

Kind Regards,
Jerry

Do you mean that the text file contains SQL statements? If so, you can execute them like this:

mysql < filename

or maybe (if you don't select the database within the file):

mysql dbname < filename

--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

Are you MySQL certified? http://www.mysql.com/certification/


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



Reply via email to