Python Fabric MySQL-Berechtigungen

Versucht, MySQL-Benutzerrechte mit Fabric festzulegen.

run("mysql -u %s -p%s -e 'grant all on %s.* to '%s'@'localhost' identified by 'PASSWORD'" % (user, dbpasswd, account))

Error

TypeError: not enough arguments for format string

Irgendeine Idee ? Danke vielmals !

run('mysql -u %s -p%s -e "grant all on %s.* to '%s\'@\'localhost' identified by 'PASSWORD'"' % (user, dbpasswd, account, account))

SyntaxError: unexpected character after line continuation character

Antworten auf die Frage(1)

Ihre Antwort auf die Frage