3

Team,

Could you guide me :

  1. how to find out the table owner in mysql ?
  2. how to alter the table ownership to another user in mysql ?
GMB
  • 216,147
  • 25
  • 84
  • 135
user3258784
  • 1,987
  • 6
  • 24
  • 28

1 Answers1

9

There is no such thing as a table owner in MySQL.

A table typically belongs to a schema (ie a database), but not to a user.

The way to enforce access control is to use GRANT or REVOKE to give or withdraw privilieges or roles to users (or roles) :

GRANT  SELECT, INSERT ON mydb.mytbl TO   'someuser'@'somehost';
REVOKE SELECT, INSERT ON mydb.mytbl FROM 'someuser'@'somehost';
GMB
  • 216,147
  • 25
  • 84
  • 135