CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'user'@'localhost';
FLUSH PRIVILEGES;
# First Login mysql shell..
sudo mysql -u root -p
CREATE USER 'username'@'localhost' IDENTIFIED BY 'P4ssW0rd';
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost';
FLUSH PRIVILEGES;
CREATE USER 'norris'@'localhost' IDENTIFIED BY 'password';
CREATE USER 'newuser'@'%' IDENTIFIED BY 'user_password';
GRANT ALL PRIVILEGES ON *.* TO 'newuser'@'%';
SHOW GRANTS FOR 'newuser'@'%';
FLUSH PRIVILEGES;
mysql> create user dbuser33 identified by "passw";
mysql> grant select, insert, update on testdb1.* to 'dbuser33';
CREATE USER 'username' IDENTIFIED BY 'password';
GRANT INSERT ON *.* TO 'username';