Creare un nuovo utente in mysql:
CREATE USER 'username'@'host' IDENTIFIED BY 'password';
Accesso a tutti i DB
mysql> GRANT ALL ON *.* TO 'username'@'host' IDENTIFIED BY 'password';
Accesso a un solo DB
mysql> GRANT ALL ON dbname.* TO 'username'@'host' IDENTIFIED BY 'password';
Accesso a una sola Tabella
mysql> GRANT ALL ON dbname.tablename TO 'username'@'host' IDENTIFIED BY 'password';
Singoli permessi su una tabella
mysql> GRANT SELECT, INSERT ON dbname.tablename TO 'username'@'host' IDENTIFIED BY 'password';
Cambio password a root:
#mysqladmin password "new password"