RE: Re[2]: Dumping database/restoring

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Richard,

> I simply login to my server and issue a command like:

> mysqldump -hmysqlserverhost.com -utheusername -p dbname >
dbname.sql

> It will then prompt me for my password and dump the database (dbname)
into dbname.sql

> -h = the sql host (often localhost)
> -u = a mysql account that has permissions to do this
> -p = prompt you to enter the password

> This file I then copy to another machine and do the reverse with
mysqlimport (same syntax, < instead of > at the end).



I am proposing to back up the database using the following command, using
putty/ssh:

>mysqldump -opt --allow-keywords -hSERVERADDRESS -uUSER -p DATABASE-NAME >
c:\localpath.sql

[from a post by Jon Benson on http://www.mysql.com/doc/en/mysqldump.html]

It worries me that --opt includes a add-drop-table command.  Since it is
creating a new file, how does this affect anything.  I just don't want to
delete anything.  Is it relevant on restoring only?

Do you think the above command is OK to try?  I'm allowing keywords as I
made the mistake of calling one of my fields 'key' and haven't changed it
yet.

Thanks,

John


                                           http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are confidential. If you are not the named recipient please notify the sender and immediately delete it. You may not disseminate, distribute, or forward this e-mail message or disclose its contents to anybody else. Copyright and any other intellectual property rights in its contents are the sole property of Cantor Fitzgerald.
     E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission.  If verification is required please request a hard-copy version.
     Although we routinely screen for viruses, addressees should check this e-mail and any attachments for viruses. We make no representation or warranty as to the absence of viruses in this e-mail or any attachments. Please note that to ensure regulatory compliance and for the protection of our customers and business, we may monitor and read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and Legal Statement at http://www.cantor.com/legal_information.html

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux