diff --git a/dingxin_toolbox_drf/settings.py b/dingxin_toolbox_drf/settings.py index 48ec555..7852b3b 100644 --- a/dingxin_toolbox_drf/settings.py +++ b/dingxin_toolbox_drf/settings.py @@ -44,8 +44,8 @@ CONFIG = { 'DB': { "HOST": '172.16.1.63', "PORT": 3306, - "USER": "dingxin", - "PASSWORD": "cine123456", + "USER": "root", + "PASSWORD": "Cine123456", "NAME": "dingxin_toolbox", }, 'REDIS_IP': '172.16.1.63' diff --git a/update/utils/db_compare.py b/update/utils/db_compare.py index fc05a79..41f2798 100644 --- a/update/utils/db_compare.py +++ b/update/utils/db_compare.py @@ -2,8 +2,9 @@ import os import subprocess import pymysql from update.utils.git_util import GitUtil -from dingxin_toolbox_drf.settings import BASE_DIR +from dingxin_toolbox_drf.settings import BASE_DIR, CONFIG from update.utils.git_util import GitUtil +from env import ENV class DbCompare: @@ -33,10 +34,10 @@ class DbCompare: # serv_pwd = 'cine123456' # serv_port = '3306' - serv_host = '172.16.3.112' - serv_user = 'test' - serv_pwd = 'cine123456' - serv_port = '3306' + serv_host = CONFIG[ENV]['DB']['HOST'] + serv_user = CONFIG[ENV]['DB']['USER'] + serv_pwd = CONFIG[ENV]['DB']['PASSWORD'] + serv_port = CONFIG[ENV]['DB']['PORT'] server_1 = f'--server1={serv_user}:{serv_pwd}@{serv_host}:{serv_port}' server_2 = f'--server2={self.target_user}:{self.target_pwd}@{self.target_server}:{self.target_port}'