From 09416286bf17f37354c73c5891f70478604818a3 Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 29 Dec 2015 13:09:05 +0800 Subject: [PATCH] fix install port bug --- install/install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/install.py b/install/install.py index 725eca728..0ada544b1 100755 --- a/install/install.py +++ b/install/install.py @@ -109,7 +109,7 @@ class PreSetup(object): def _test_db_conn(self): try: - MySQLdb.connect(host=self.db_host, port=self.db_port, + MySQLdb.connect(host=self.db_host, port=int(self.db_port), user=self.db_user, passwd=self.db_pass, db=self.db) color_print('连接数据库成功', 'green') return True @@ -157,7 +157,7 @@ class PreSetup(object): self._setup_mysql() else: db_host = raw_input('请输入数据库服务器IP [127.0.0.1]: ') - db_port = int(raw_input('请输入数据库服务器端口 [3306]: ')) + db_port = raw_input('请输入数据库服务器端口 [3306]: ') db_user = raw_input('请输入数据库服务器用户 [root]: ') db_pass = raw_input('请输入数据库服务器密码: ') db = raw_input('请输入使用的数据库 [jumpserver]: ')