webmonk: Neuen User zur DB in MySQL hinzufügen

Beitrag lesen

<CODE>
INSERT INTO user (Host, User, Password, Select_priv, Insert_priv,
Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv,
Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv,
Index_priv, Alter_priv)

VALUES ('localhost', 'foo', PASSWORD('bar'), 'N', 'N', 'N', 'N', 'N',
'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N')
</CODE>

Wäre das ganze nicht viel "schöner" wenn du den Befehl GRANT verwendest?

Bsp.: GRANT SELECT ON myDatabase.* TO myNewUser IDENTIFIED BY "secretpwd";

mfg webmonk