create user:
CREATE USER 'newuser'@'localhost'
IDENTIFIED BY 'password';
grant privileges:
GRANT ALL PRIVILEGES ON your_database.tables
TO 'newuser'@'localhost';
-- 2in1:
GRANT SELECT ON auth.*
TO 'webauth'@'localhost'
IDENTIFIED BY 'webauth';
-- reload:
FLUSH PRIVILEGES;
-- show privileges:
SHOW GRANTS FOR `webauth`@`localhost`;
-- show all users:
SELECT User, Host, Password FROM mysql.user;