Granting privileges to a user named "Grant"?

You have to use backticks when using reserved keywords or identifiers with otherwise illegal characters as identifiers

GRANT INSERT, DELETE
ON table
TO `Grant`@localhost;

Apostrophes or double quotes are fine, too as per the documentation:

Quote user names and host names as identifiers or as strings, using either backticks (`), single quotation marks ('), or double quotation marks ("). For string-quoting and identifier-quoting guidelines, see Section 9.1.1, “String Literals”, and Section 9.2, “Schema Object Names”.

...but I'm a purist and will always use backticks in MySQL, for identifiers.

Tags:

Mysql

Sql

Grant