Create a new user in MySQL

Cheat sheet:

CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
CREATE USER 'newuser'@'%' IDENTIFIED BY 'password';
CREATE USER 'newuser'@'127.0.0.1' IDENTIFIED BY 'password';
 
GRANT USAGE ON *.* TO 'newuser'@'localhost';
GRANT ALL PRIVILEGES ON *.* TO 'newuser'@'localhost';
GRANT ALL PRIVILEGES ON db.table TO 'newuser'@'localhost';