Getting 0KB of size file while backup mysql database using mysql dump

亡梦爱人 提交于 2019-12-04 20:33:43

There a few suggestion:
1. Compulsary to use absolute path for mysqldump.
2. Try using --opt (default option for mysqldump). Can refer http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html
3.For the option, if use short form, no need to have (--). eg: --p. Use (--) when use full form. eg: --password. So use '-p' instead of '--p' (applied for others option too).
4. try 'shell_exec' or 'system' if mysqldump doesnt work on 'exec'.
5. try avoid have space between option and variable. Eg: -p$dbpass

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!