Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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

share|improve this question
    
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. –  Yasir Arsanukaev Apr 12 '13 at 9:15
    
I want to create a new Database with a new owner. –  peacepanda Apr 12 '13 at 9:22
    
As far as I know, there is no such concept of database and / or table "owner" in mySQL. –  RoKa Apr 12 '13 at 9:24
    
When you say "owner", do you mean "database user"? If so, you probably need CREATE DATABASE and CREATE USER statements. –  Yasir Arsanukaev Apr 12 '13 at 9:24

1 Answer 1

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' ;

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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