User creation in Mysql
Admin access:
Syntax:
create user 'user_name'@'%' identified by
'password';
grant all privileges on *.* to 'user_name'@'%'
with grant option;
flush privileges;
|
grant all privileges on *.* to 'MysqlAdmin'@'%' with grant option;
flush privileges;
Read access:
Syntax
create user 'user_name'@'%' identified by
'password';
grant <mention_privileges>
on db_name.* to 'user_name'@'%' ;
|
create user 'Read'@'%' identified by 'R#@d123';
grant select,show view,execute on Chennai_db.* to 'Read'@'%';
grant select,show view,execute on Hyd_db.* to 'Read'@'%';
flush privileges;
Comments
Post a Comment