2

Can someone tell me what is the SQL command to create a table with specific owner?

4
  • What do you mean? Do you want to give some user access to the table owned by another user? If so, you need to use GRANT privilege ON table_name TO user_name or similar DCL command. Apr 12, 2013 at 9:15
  • I want to create a new Database with a new owner.
    – peacepanda
    Apr 12, 2013 at 9:22
  • As far as I know, there is no such concept of database and / or table "owner" in mySQL.
    – RoKa
    Apr 12, 2013 at 9:24
  • When you say "owner", do you mean "database user"? If so, you probably need CREATE DATABASE and CREATE USER statements. Apr 12, 2013 at 9:24

1 Answer 1

6

There is no concept such as OWNER in mySQL for databases or for tables.

You will need to enforce security in the traditional way with granting very specific user privileges.

for e.g. for inserts: GRANT INSERT ON database.* TO 'username'@'hostname' ;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.