Re: Whats wrong with this query?

From: Date: Mon, 10 Nov 2003 16:56:32 +0000
Subject: Re: Whats wrong with this query?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-169052@lists.php.net to get a copy of this message
Hi Dave, I could be wrong cause i am answering without running your code : 1) your mysql user account probably does not have grant privileges. good thing too. It's very dangerous to just run a grant query like this because it can so easily be abused by a malicious user. (of course you might have security measures in place which are not obvious to us because you have not posted that part of the code). 2) your variables should in the strictest sense be $_POST['f2'] etc. all the best Dave Carrera wrote:
$addamysqluser = mysql_query("grant select,insert,drop,update,delete,create,index,alter on $_POST[f2] to $_POST[f2]@10.0.0.13 IDENTIFIED by $_POST[f3]"); What is wrong with the above php based mysql_query ? I am trying to add a user to mysql granting just the specified rights to table defined by the $_POST[f2] which is both the table and username and the password is defined by $_POST[f3]. This has been baffleing me for a couple of days now and any help given is very much appreciated. Thank you in advance. Yours Dave C
-- Raditha Dissanayake. ------------------------------------------------------------------------ http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 150 KB | with progress bar.

« previous php.general (#169052) next »