Skip to content

Commit

Permalink
解决mysql密码包含!时my2sql认证报错问题 (#1709)
Browse files Browse the repository at this point in the history
  • Loading branch information
nick2wang authored Jul 28, 2022
1 parent 36bd216 commit 0433821
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sql/binlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ def my2sql(request):
my2sql = My2SQL()

# 准备参数
instance_password = shlex.quote(f'"{str(instance.password)}"')
instance_password = shlex.quote(str(instance.password))
args = {
"conn_options": rf"-host {shlex.quote(str(instance.host))} -user {shlex.quote(str(instance.user))} \
-password '{instance_password}' -port {shlex.quote(str(instance.port))} ",
-password ''{instance_password}'' -port {shlex.quote(str(instance.port))} ",
"work-type": work_type,
"start-file": start_file,
"start-pos": start_pos,
Expand Down

0 comments on commit 0433821

Please sign in to comment.