2

我想备份我的数据库。所以我使用了这个命令

$command = "mysqldump --user=root asset_management > D:\assetmanagement\public\backup\backup.sql"; system($command);

但这会产生一个空的sql文件..有人可以帮忙吗?

4

2 回答 2

1

$command = "mysqldump --user=root -pass=yourpassword asset_management > D:\assetmanagement\public\backup\backup.sql"; system($command);

于 2013-05-21T07:08:53.727 回答
1

假设您的 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 ";
于 2013-02-27T08:14:03.100 回答