How to Create a New User
Let’s start by making a new user within the MySQL shell:
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
At this point
newuser has no permissions to do anything with the databases. In fact, even if
newuser tries to login (with the password,
password), they will not be able to reach the MySQL shell.
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';