MySQL Forums
Forum List  »  PHP

Access denied. You need the FILE privilege for this operation
Posted by: hirakumar maharjan
Date: February 07, 2006 03:59AM

I am testing to back the database into my computer's disk. While I backup the database into my computer. I got problem of "Access denied. You need the FILE privilege for this operation". How could I backup to my hardDisk.

Check the page : http://www.fohrid.org.np/db/backup.php

**************************** CODE************************
<?php


$dbh=mysql_connect ("localhost", "fohrido_hira", "hira") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("fohrido_testdb");

echo "Lock Process<br />";

$lock=mysql_query("LOCK TABLES onetable READ,twotable READ") or die (mysql_error());

echo "Sucess Lock Process<BR><BR \>";



echo "BACKUP PROCESS:<BR \>";

$backup=mysql_query("BACKUP TABLE onetable,twotable TO 'd:\\ok'") or die (mysql_error());

echo "Sucess Backup Process<br><BR \>";



echo "UNlock Process<BR \>";

$unlock=mysql_query("UNLOCK TABLES") or die (mysql_error());

echo "Sucess Unlock<br>";


?>

Options: ReplyQuote


Subject
Written By
Posted
Access denied. You need the FILE privilege for this operation
February 07, 2006 03:59AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.