How do I get the query for a dump of an entire MySQL database in PHP? I am planning to then dump it into a .sql file.
There is no single "query" (unless the database is structurally simple). What you are asking for is a maintenance operation which is done with the specialized utility mysqldump
.
i dont think you can do like a mysql_query("BACKUP NOW"); instead look here:
http://davidwalsh.name/backup-mysql-database-php
http://www.noupe.com/how-tos/10-ways-to-automatically-manually-backup-mysql-database.html
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.