Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Allow user to create and alter table?

Tags:

mysql

I have a current mysql user who has SELECT privileges for all the table in database example. How can give that user privileges to add new tables, and alter/add records to the table it created?

like image 573
Jonah Katz Avatar asked Aug 18 '11 20:08

Jonah Katz


People also ask

How do I grant privileges to a user in SQL?

You can use the SQL GRANT statement to grant SQL SELECT, UPDATE, INSERT, DELETE, and other privileges on tables or views. The WITH GRANT OPTION clause indicates that JONES can grant to other users any of the SQL privileges you granted for the ORDER_BACKLOG table.


1 Answers

Use the grant keyword combined with the table privileges you seek to give the user.

GRANT ALTER, CREATE ON example TO 'someuser'@'somehost';

MySQL Grant

MySQL Table Privileges

like image 75
Jrod Avatar answered Nov 07 '22 18:11

Jrod