Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/03/2012, 21:44
OscarGim
 
Fecha de Ingreso: octubre-2005
Ubicación: Argentina
Mensajes: 51
Antigüedad: 19 años
Puntos: 0
Mensaje Creau Usuario mysql

Hola, necesito ejecutar el siguiente texto en una base de datos para crear un usuario pero me devuelve un error al ejecutar por SQL lo siguiente:

CREATE USER 'astrealtime'@'localhost' IDENTIFIED BY 'MYPASS';
GRANT FILE ON * . * TO 'astrealtime'@'localhost' IDENTIFIED BY 'MYPASS' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
GRANT INSERT ON `asterisk`.`cdr` TO 'astrealtime'@'localhost';
GRANT SELECT , INSERT , UPDATE , DELETE ON `asterisk`.`queue_members` TO 'astrealtime'@'localhost';
GRANT SELECT , UPDATE ON `asterisk`.`queues` TO 'astrealtime'@'localhost';
GRANT SELECT , UPDATE ON `asterisk`.`sip` TO 'astrealtime'@'localhost';
GRANT SELECT , UPDATE ON `asterisk`.`voicemail_users` TO 'astrealtime'@'localhost';
GRANT SELECT , UPDATE , INSERT , DELETE ON `asterisk`.`voicemail_messages` TO 'astrealtime'@'localhost';


Y me devuelte esto:


Failed to execute SQL : SQL CREATE USER 'astrealtime'@'localhost' IDENTIFIED BY 'MYPASS'; GRANT FILE ON * . * TO 'astrealtime'@'localhost' IDENTIFIED BY 'MYPASS' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ; GRANT INSERT ON `asterisk`.`cdr` TO 'astrealtime'@'localhost'; GRANT SELECT , INSERT , UPDATE , DELETE ON `asterisk`.`queue_members` TO 'astrealtime'@'localhost'; GRANT SELECT , UPDATE ON `asterisk`.`queues` TO 'astrealtime'@'localhost'; GRANT SELECT , UPDATE ON `asterisk`.`sip` TO 'astrealtime'@'localhost'; GRANT SELECT , UPDATE ON `asterisk`.`voicemail_users` TO 'astrealtime'@'localhost'; GRANT SELECT , UPDATE , INSERT , DELETE ON `asterisk`.`voicemail_messages` TO 'astrealtime'@'localhost'; failed : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GRANT FILE ON * . * TO 'astrealtime'@'localhost' IDENTIFIED BY 'levelpass' WITH ' at line 1


Hay otra manera de insertarlo o algo esta mal en el texto??



MySQL version 5.1.58
Centos 5.8



Gracias!