add grant privileges to mysql user code example
Example 1: mysql add user with all privileges
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
FLUSH PRIVILEGES;
Example 2: grant all privileges database postgres to user
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA schema_name TO username;