mysqldump working on local but not on godaddy serv

2019-09-08 06:14发布

问题:

I had used php exec shell commands to get the dump of database. Its working fine on local but when i run that same php file on server, it says 'mysqldump' is not recognized as an internal or external command, operable program or batch file.

I am using the database credentials of the live database on godaddy server with windows hosting(PLESK)

shell_exec('mysqldump --host='.$mysqlHostWithNoPort.' --password='.$mysqlPassword.' '.$DbName.' --user='.$mysqlUserName.' --single-transaction>DB_Backup/'.$filename .' 2>&1');

I had defined the variables used above in my config file.

标签: php mysql shell