"mysqldump" creates an 'SQL' script, which you 'run' to recreate the tables
and data within them.
Something like this should do the trick...
mysql -u root -p password NewDataBaseName < file.mysql
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 30, 2001 9:39 AM
Subject: Backup / Import Questions
> Hi,
>
> I have built a database with 7 tables in it, the time has come when I need
to
> create a suitable backup system so off I went to my manuals. I read
through
> the mysqldump command and everything seemed straight forward. I ran the
> following...
>
> mysqldump -uroot -ppassword --opt Database > file.mysql
>
> And it exported fine, I read through the file.mysql and everything was in
> there, all the tables and all the test data. I was happy but then I
thought,
> well I better check I know how to use the data if something does go wrong.
So
> I created a new database called 'testing' I read up on the mysqlimport and
> was suprised to see it tell me that all the tables need to be present
before
> importing, I did try importing my file anyway just to double check and it
did
> fail. So I have a couple of questions.
>
> Why does mysqldump allow you to dump all the table create data with the
> actual data if the import function doesnt allow you to use it?
>
> Because of this I assume the best method for backing up will be to dump
all
> the table create commands and save the file somewhere and then back up
each
> individual table's data regularly. Then if something did go wrong I can
copy
> n paste my table create commands into SHH/Telnet and then run import on
each
> of the table files. ???
>
> Or am I just stupid and there is a much easier way to do all of this???
:-)
>
> TIA
>
>
> __________________
> -Ade
>
> ~~Good things come to those who wait~~
>
>
> ---------------------------------------------------------------------
> 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