Skip to content Skip to sidebar Skip to footer

Python Fabric Mysql Privileges

Trying to set mysql user privileges with fabric. run('mysql -u %s -p%s -e 'grant all on %s.* to '%s'@'localhost' identified by 'PASSWORD'' % (user, dbpasswd, account)) Error TypeE

Solution 1:

Change your tuple to (user, dbpasswd, account, user) and you should be good. This error happens because you have 4 replacements tokens (%s) but only have 3 items in your tuple.


Post a Comment for "Python Fabric Mysql Privileges"