programming-examples/sql/UserManagement/4. How to grant a user permission to create, insert, update, delete and create temporary tables from localhost.sql

14 lines
484 B
MySQL
Raw Normal View History

2019-11-18 14:05:53 +01:00
/*4. How to grant a user permission to create, insert, update, delete and create temporary tables from localhost.
*/
/*Syntax :
grant [<permission_1,permission_2,...permission_n>|<all>]
on [database].[<table_name>|<all_tables(*)>]
to [user name]@[<localhost>|<IP address>|<any host('%')>]
identified by ["password"];
*/
grant select, create, insert, update, delete, create temporary tables
on posts.* to amit@localhost identified by 'mypassword';
flush privileges;