|
From: | Tiago Barcellos Peczenyj |
Subject: | Re: [shell-script] criar usario comum no mysql na maquina remota, via ssh |
Date: | Tue, 21 Nov 2006 15:14:48 -0200 |
Tente desabilitar o pseudo-tty allocation para parar de ver este warning E tente executar assim: SQL="GRANT usage ON *.* TO usuario@localhostIDENTIFIED BY 'senha_usuario';" ssh -T root@$xx.xx.xx.xx <<-EOF echo "--------inicio--------" mysql -u root -psenha -e "${SQL}" 2>&1 && echo "ok" || echo "nok" echo "---------fim----------" EOF Veja o que acontece On 11/21/06, address@hidden <address@hidden> wrote:
Olá Flávio Primeiro quero agradecer mutissimo sua sugestão, e extrema rapidez na resposta. Fiz um primeiro teste da solução sugerida (adaptando os meus dados, IP, senha, etc... e obtive a seguinte mensagem: resposta: $ ssh root@$xx.xx.xx.xx <<EOF mysql -u root -psenha -e " GRANT usage ON *.* TO usuario@localhostIDENTIFIED BY 'senha_usuario'; " EOF $Pseudo-terminal will not be allocated because stdin is not a terminal. stdin: is not a tty
-- Tiago B Peczenyj Linux User #405772 # cd /pub # more beer
[Prev in Thread] | Current Thread | [Next in Thread] |