I want only certain users to have access to the new table.

Asked 2 years ago, Updated 2 years ago, 47 views

To allow only certain users to access the table, should I do identified by' when I do create table? Or should I do grant later?

mysql

2022-09-29 20:26

1 Answers

identified by is not available in create table because identified by is used to specify a password when creating a user.

Users must grant permissions with grant after creating the user to access the table.

If you only want to allow SELECT in the table,

grant select on DB name.Table name to username

specifies the .
If you want to allow all operations on the table

grant all on DB name.Table name to username

and


2022-09-29 20:26

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.