MySql grant user permission

后端 未结 4 1941
既然无缘
既然无缘 2021-01-06 08:58

I want to create a new user in MySql. I do not want that new user to do much with my existing databases [I just want to grant Select privilege to him], but he can do anythin

4条回答
  •  無奈伤痛
    2021-01-06 09:30

    grant privilege is given in data base like this

    grant privilege on object to user
    

    object is any data base table or relation and user might be the whom the privilege is provided to him.

    Example

    grant select,insert,update,on object name to user name
    
    grant select on employee to john with grant option;
    
    revoke delete on employee from john.
    

提交回复
热议问题