Create a backup copy of a table called Customers into a table called Customers2 on a running database called Backup:
INTO Customers2 IN 'Backup.mdb'
You can also specify multiple tables to pull data from when bringing that data into a new table, effectively merging data into a backup database:
SELECT Customers.Site, IPs.IP
LEFT JOIN IPs
Since this is more like replication than backup, MySQL also has a mysqldump command, used to dump a sql database to a file or screen, or whatever. Here, we’ll export all of our databases in a running MySQL instance into a file called dumpfile.sql:
mysqldump --all-databases > dumpfile.sql