Where you see user
and
password
, substitute an appropriate
user name and password.
Create a user account with all schema-level privilege
Press CTRL+C to copyCREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
Press CTRL+C to copyGRANT ALL ON *.* TO 'user'@'localhost' WITH GRANT OPTION;
The account can be used to connect to the server only from the local host.
Create a user account with specific schema-level privileges to access the world schema
Press CTRL+C to copyCREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
Press CTRL+C to copyGRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON world.* TO 'user'@'localhost' WITH GRANT OPTION;
Show grants enabled for the current user account
Press CTRL+C to copySHOW GRANTS;