Re: Using SELECT INTO to Backup a Database




himilecyclist@xxxxxxxxx wrote:
Thanks for the suggestions!

The reference I am using, "Sams Teach Yourself SQL", indicates that
SELECT * INTO can be used to copy one table to another:

"To copy the contents of a table into a brand new table (one that is
created on-the-fly) you can use the SELECT INTO statement."

From what I have read here, that is not an accurate description for
MySQL.

Our goal is some PHP code that will create a copy (for backup purposes)
of a MySQL table residing on a production Linux server. We would like
to create the copy on the user's local machine. Is there a better way
to accomplish that?

Thanks!

I suggest using MySQL Backup, written in perl. It lets you backup on a
per-table per-database basis, archives, compresses, and emails them to
you, as well as rotates previous backups. Its very handy.

http://worldcommunity.com/opensource/utilities/mysql_backup.html

.