1CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
2GRANT ALL PRIVILEGES ON * . * TO 'user'@'localhost';
3FLUSH PRIVILEGES;
1CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
2GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
3FLUSH PRIVILEGES;
1# First Login mysql shell..
2sudo mysql -u root -p
3CREATE USER 'username'@'localhost' IDENTIFIED BY 'P4ssW0rd';
4GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost';
5FLUSH PRIVILEGES;
1CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
2#grant permissions to a specic database and/or table
3GRANT ALL PRIVILEGES ON database.table TO 'newuser'@'localhost';
4#Or grant wildcar permission to any DB/table
5GRANT ALL PRIVILEGES ON *.* TO 'newuser'@'localhost';