selecting mysql users from database and their permissions code example
Example 1: how to create new database user
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
Example 2: how to add privilege in mysql user
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';