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, a
GRANT SELECT, INSERT, DELETE ON database TO username@'localhost' IDENTIFIED BY 'password';
You can use UPDATE in the list too.
maybe something like
GRANT ALL PRIVILEGES ON example
. * TO 'user'@'%';
This gives all the privileges for ONLY the 'example' database to user
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
Old; but just because it comes first when you query about "mysql grants to create table"
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, LOCK TABLES, SHOW VIEW ON database
.* TO 'user'@'host'