Suppose, there is an existing database name 'Company'. To create a new user and grant access to newly created user, enter this query -
mysql->GRANT USAGE ON Company.* to champ@localhost IDENTIFIED BY 'efw232@d';
This creates new user 'champ' if it doesn't already exist, and sets the password to 'efw232@d'. This statement also permits champ user access to all tables within Company database.
Grant statement privileges to user
The above statement only allows user to log into database. To create, insert new data, the administrator has to grant permission for this.
Solution:
Suppose, there is an existing database name 'Company'. To create a new user and grant access to newly created user, enter this query -
This creates new user 'champ' if it doesn't already exist, and sets the password to 'efw232@d'. This statement also permits champ user access to all tables within Company database.
Grant statement privileges to user
The above statement only allows user to log into database. To create, insert new data, the administrator has to grant permission for this.
The above statement grants only permission to CREATE, INSERT, SELECT, UPDATE data. To grant all possible permission to user, enter this statement -
need an explanation for this answer? contact us directly to get an explanation for this answer