943,022 Members | Top Members by Rank

Ad:
  • MySQL Discussion Thread
  • Unsolved
  • Views: 610
  • MySQL RSS
Sep 4th, 2010
0

Error:UPDATE command denied to user 'somethin_root'@'localhost' for table 'user'

Expand Post »
I Can't upload imige as my database donot support update although i give all previliges to the user root.Whats the problem??
Please Any one help me.The same code work on local PC.
The link is:

http://csefriends.com/index.php?page...ange_image.php

The code is given below:
MySQL Syntax (Toggle Plain Text)
  1. <?php
  2. $id=$_SESSION['userid'];
  3. $name=$_POST['name'];
  4. $fname=TIME();
  5. $type= ".jpeg";
  6. $fname = $fname.$type;
  7. $uploaddir = 'upload/';
  8. $uploadfile = $uploaddir . $fname;
  9. if(move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile)) {
  10. $success="Data Added Successfully";
  11. } ELSE{
  12. $success= "There was an error uploading the file, please try again!";
  13. }
  14.  
  15. $q="UPDATE `friendsdb`.`user` SET `link` = '$uploadfile' WHERE `user`.`id` ='$id' LIMIT 1 ;";
  16.  
  17. if(mysql_query($q)) echo "Your image uploaded successfully.";
  18. ELSE echo mysql_error();
  19.  
  20.  
  21. ?>
  22. <script language='javascript'>
  23. alert('<?php echo $success; ?>');
  24. </script>
  25. <html>
  26. <head>
  27.  
  28. </head>
  29. </html>
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
amanu092 is offline Offline
12 posts
since Sep 2010
Sep 5th, 2010
0
Re: Error:UPDATE command denied to user 'somethin_root'@'localhost' for table 'user'
You need to provide privileges to somethin_root (or whatever user you have created on your hosting) not the root. root user is not available on shared hosting environment.
Reputation Points: 29
Solved Threads: 47
Posting Whiz
mwasif is offline Offline
312 posts
since Dec 2007
Sep 5th, 2010
0
Re: Error:UPDATE command denied to user 'somethin_root'@'localhost' for table 'user'
Thanks brother mwasif.
I provide all the previliges
to user somethin_root
but the problen doesnot solved.
I also tried for user somethin_admin
also for user somethin_aman
but the result is same.
what can i do now?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
amanu092 is offline Offline
12 posts
since Sep 2010
Sep 5th, 2010
0
Re: Error:UPDATE command denied to user 'somethin_root'@'localhost' for table 'user'
Where are you facing this problem? On your local system or on a production server?
Reputation Points: 29
Solved Threads: 47
Posting Whiz
mwasif is offline Offline
312 posts
since Dec 2007
Sep 5th, 2010
0
Re: Error:UPDATE command denied to user 'somethin_root'@'localhost' for table 'user'
Run the following query to show the user's current rights
mysql Syntax (Toggle Plain Text)
  1. SHOW GRANTS FOR 'somethin_root'@'localhost';
Reputation Points: 29
Solved Threads: 47
Posting Whiz
mwasif is offline Offline
312 posts
since Dec 2007
Sep 5th, 2010
0
Re: Error:UPDATE command denied to user 'somethin_root'@'localhost' for table 'user'
Thanks a lot @brother mwasif.I solved my problem.
removing `friendsdb`. on line 15.
thanks a lot again.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
amanu092 is offline Offline
12 posts
since Sep 2010
Sep 5th, 2010
0
Re: Error:UPDATE command denied to user 'somethin_root'@'localhost' for table 'user'
What was the problem?
Reputation Points: 29
Solved Threads: 47
Posting Whiz
mwasif is offline Offline
312 posts
since Dec 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MySQL Forum Timeline: Strange MySQL Performance Problem.
Next Thread in MySQL Forum Timeline: navicat questions





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC