Is it possible to grant permissions to multiple tables simultaneously?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 可以多表同时授权吗?

| username: 逍遥_猫

Can it authorize multiple tables like MySQL?
Currently, an error is prompted when executing in V6.5.6
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 68 near

| username: zhaokede | Original post link

All permissions are granted individually.

| username: TiDBer_QYr0vohO | Original post link

It won’t work.

| username: DBAER | Original post link

Marking it, previously it was mainly database-level settings.

| username: xiaoqiao | Original post link

Grant all privileges on db.*

| username: forever | Original post link

Not supported, compatible with MySQL, and MySQL does not support it either.

| username: kelvin | Original post link

Grant permissions individually

| username: TiDBer_JUi6UvZm | Original post link

Not supported

| username: Jack-li | Original post link

Definitely not.

| username: changpeng75 | Original post link

Looking at the syntax diagram of the grant statement, it is clear that the ObjectType and PrivLevel clauses following the keyword “on” cannot be repeated, indicating that multiple objects are not supported.

| username: YuchongXU | Original post link

Not supported.

| username: mono | Original post link

Just like MySQL. It is not supported.

| username: zhang_2023 | Original post link

Not supported.

| username: TiDBer_RjzUpGDL | Original post link

Not supported

| username: linnana | Original post link

Not supported

| username: QH琉璃 | Original post link

It’s not possible.

| username: 呢莫不爱吃鱼 | Original post link

Not supported~

| username: TiDBer_LM | Original post link

Just like MySQL. It is not supported.

| username: TI表弟 | Original post link

Is it not possible to surpass MySQL?

| username: Jellybean | Original post link

You can try using fuzzy matching to implement multi-table authorization.