how to grant access to mysql user code example
Example 1: how to add privilege in mysql user
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
Example 2: assign user to database mysql
GRANT type_of_permission ON database_name.table_name TO ‘username’@'localhost’;