Why is my database backup script not working in php?

前端 未结 4 1601
北海茫月
北海茫月 2020-12-06 03:05

I am using the Database Backup script by David Walsh(http://davidwalsh.name/backup-mysql-database-php) to backup my MYSQL database as a .sql file to my server.

I cre

4条回答
  •  感动是毒
    2020-12-06 03:59

    The script looks very weak IMHO. You should consider using mysqldump it it's available in your system.

    Update

    The basic command line would be:

    mysqldump -hYOURHOSTNAME -uYOURUSER -pYOURPASSWORD infocap > dump.sql
    

    You can test mysqldump in your local computer and, once you're happy with the results, either create a shell script or add it directly as a cron task.

提交回复
热议问题