File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
clickhouse_mysql/dbclient Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ def connect(self, db):
58
58
try :
59
59
self .connection = MySQLdb .connect (
60
60
host = self .host ,
61
+ port = self .port ,
61
62
user = self .user ,
62
63
passwd = self .password ,
63
64
db = db ,
@@ -66,15 +67,17 @@ def connect(self, db):
66
67
use_unicode = True ,
67
68
)
68
69
self .cursor = self .connection .cursor ()
69
- logging .debug ("Connect to the database host={} user={} password={} db={}" .format (
70
+ logging .debug ("Connect to the database host={} port={} user={} password={} db={}" .format (
70
71
self .host ,
72
+ self .port ,
71
73
self .user ,
72
74
self .password ,
73
75
db
74
76
))
75
77
except :
76
- raise Exception ("Can not connect to the database host={} user={} password={} db={}" .format (
78
+ raise Exception ("Can not connect to the database host={} port={} user={} password={} db={}" .format (
77
79
self .host ,
80
+ self .port ,
78
81
self .user ,
79
82
self .password ,
80
83
db
@@ -106,8 +109,9 @@ def tables_list(self, db):
106
109
107
110
except Exception as err :
108
111
logging .debug ("Unexpected error: {}" .format (str (err )))
109
- raise Exception ("Can not list tables on host={} user={} password={} db={}" .format (
112
+ raise Exception ("Can not list tables on host={} port={} user={} password={} db={}" .format (
110
113
self .host ,
114
+ self .port ,
111
115
self .user ,
112
116
self .password ,
113
117
db
You can’t perform that action at this time.
0 commit comments