En TDolphin:
- Code: Select all Expand view
METHOD AddUser( cHost, cUser, cPassword, cDb, lCreateDB, acPrivilegs, cWithOption )
/*The AddUser() enables system administrators to grant privileges to MySQL user accounts.
AddUser also serves to specify other account characteristics such as use of secure
connections and limits on access to server resources.
To use AddUser(), you must have the GRANT OPTION privilege,
and you must have the privileges that you are granting.*/
Tambien podes crearlo a mano con execute
- Code: Select all Expand view
oCn:Execute("CREATE USER 'username'@'%' IDENTIFIED BY 'password'")
oCn:Execute("GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON basedatos.* TO 'username'@'%';
No se si la nueva clase nativa de FW tiene el metodo adduser.
El simbolo % puedes reemplazarlo por una ip o por localhost si no queres que tenga acceso remoto.