mysqldump -uroot -p123456 anli >D:\wamp64\www\項目\storage\app\laravel_base_20180502175148.sql
注意:-p和123456是挨著的,如果-p和123456不挨著會提示你輸入密碼Enter password的,那會只生成一個文件名,沒有數據
接下來shell_exec來執行吧命令行下會輸出一行提示,mysqldump: [Warning] Using a password on the command line interface can be insecure.
不用管,直接就生成了一個sql的備份文件
自動任務都可了