0

可能重复:
python fabric mysql 权限

试图用fabric设置mysql用户权限。

任何想法 ?非常感谢 !

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
4

1 回答 1

2

尝试将您的线路更改为:

run('mysql -u %s -p%s -e "grant all on %s.* to \'%s\'@\'localhost\' identified by \'PASSWORD\'"' % (user, dbpasswd, account, account))
于 2012-07-09T13:26:21.210 回答