python fabric mysql privileges

前端 未结 1 1516
忘了有多久
忘了有多久 2021-01-21 17:00

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, dbpa         


        
相关标签:
1条回答
  • 2021-01-21 17:45

    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.

    0 讨论(0)
提交回复
热议问题