My Oracle Support Banner

LAST_ERROR_NUMBER: 1064 DURING GRANT SELECT (Doc ID 2492821.1)

Last updated on FEBRUARY 03, 2019

Applies to:

MySQL Server - Version 5.7 and later
Information in this document applies to any platform.

Symptoms

On : MySQL 5.7 version, Other Technical Problem

When try to make the grant

grant SELECT(order) on db.table to 'user'@'%';
grant SELECT(column) on db.table1 to 'user'@'%';
grant SELECT(regexp) on db.table2 to 'user'@'%';



the database return:

Error 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order) ON `db`.`table` TO 'user'@'%'' at line 1' on query. Default database: '' (for the all grant)



but if I put ` :

grant SELECT(`order`) on db.table to 'user'@'%';


the grant work fine but the replication return the same error.
 

ERROR
-----------------------

2018-09-11T07:11:58.497464Z 39561 [ERROR] Slave SQL for channel '': Error 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order) ON `awg`.`query_report_groups` TO 'lingrilli'@'%'' at line 1' on query. Default database: ''. Query: 'GRANT SELECT (order) ON `awg`.`query_report_groups` TO 'lingrilli'@'%'', Error_code: 1064
2018-09-11T07:11:58.497486Z 39561 [Warning] Slave: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order) ON `awg`.`query_report_groups` TO 'lingrilli'@'%'' at line 1 Error_code: 1064



Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.