Create users
The following steps are explained to you how create the users in MySQL.
- This query is used to create a user in the particular host only,
create user 'username'@'hostname' identified by 'password'; This user cannot access from the other hosts
- If you want to the user access from other machines then use the below query,
create user 'username'@'%'; - The below query is used to give the all privileges to the user on the particular database,
grant all privileges on '<database>.<tables>' to 'username'@'hostname';
- The below query is used to give some privileges to users on the particular database,
grant select,update on '<database>.<tables>' to 'username'@'hostname';
Comments
Post a Comment