0

I create a mysql database using CPanel on a shared hosting server ... i have given privileges of CREATE, UPDATE, DELETE, INSERT to the user, what privilege should i give to use the REPLACE syntax .... available privileges (as you might already know)... ALTER, CREATE ROUTINE, CREATE VIEW, DROP, INDEX, LOCK TABLES, SELECT, UPDATE, CREATE, CREATE TEMPORARY TABLES, DELETE, EXECUTE, INSERT, REFERENCES, SHOW VIEW ... but i could not find the REPLACE privilege ... as this is my first experience on online server .... i have no clue please help ... :)

Kold
  • 65
  • 1
  • 6

1 Answers1

4

Quoting the manual page for replace :

To use REPLACE, you must have both the INSERT and DELETE privileges for the table.

Which makes sense, considering that replace can do either a simple insert, or a delete and then an insert (if the first insert failed because a duplicate-key error occured).

Pascal MARTIN
  • 395,085
  • 80
  • 655
  • 663