我想备份我的数据库。所以我使用了这个命令
$command = "mysqldump --user=root asset_management > D:\assetmanagement\public\backup\backup.sql";
system($command);
但这会产生一个空的sql文件..有人可以帮忙吗?
$command = "mysqldump --user=root -pass=yourpassword asset_management > D:\assetmanagement\public\backup\backup.sql"; system($command);
假设您的 mysqldump 位于 C:/wamp/bin/mysql/mysql5.1.33/bin/ 文件夹中
$mysqlPath="C:/wamp/bin/mysql/mysql5.1.33/bin/";
//There should be password for root user. Blank password will not work.
$command = $mysqlPath . "mysqldump.exe asset_management > D:\assetmanagement\public\backup\backup.sql --user=root --password=yourpassword ";