Dear Ben,
there is no need for two separate .sql files (maybe there *is* a need,
you will know ;-)
To dump structures from one database, all tables and all data included,
and with "drop table" so you can restore overwriting existing tables:
mysqldump my_db --add-drop-table > my_db.sql
To restore:
mysql < my_db.sql my_db
You may have to enter username and password, in this case:
mysqldump -u username -p my_db --add-drop-table > my_db.sql
and
mysql -u username -p < my_db.sql my_db
For a dump of all databases:
mysqldump --all-databases ... etc.
See http://www.mysql.com/doc/m/y/mysqldump.html for details.
Regards,
--
Stefan Hinz
Geschäftsführer / CEO iConnect e-commerce solutions GmbH
# www.js-webShop.com www.iConnect.de
# Gustav-Meyer-Allee 25, 13355 Berlin
# Tel: +49-30-46307-382 Fax: +49-30-46307-388
----- Original Message -----
From: "Ben Davis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 21, 2001 10:25 PM
Subject: Loading Data
> I have a .sql file that I got from a PHPMyAdmin dump. Now I want to
run the
> sql commands that are in that sql file, possibly even including the
INSERT
> commands.. I have one that contains just the structure and one that
has the
> structure and data. What are the commands to run all the queries in
the
> .sql file. Thanks
>
> Ben
>
> ____________________________
> Ben Davis
> Digital Dog, Inc.
> (615) 777-1938
> [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php