diff --git a/tools/scripts/dooba.py b/tools/scripts/dooba.py index b802b5a4c51ae0fbd06eba7d056e23870fe4e7b1..429312435f8ed45d968018c140e38f6b8993d00e 100644 --- a/tools/scripts/dooba.py +++ b/tools/scripts/dooba.py @@ -1079,7 +1079,13 @@ class oceanbase(object): self.app_info = ObConfigHelper().get_app_info(dataid) def dosql(self, sql, host=None, port=None, database=None): - if host is None: + cmd = "mysql -V" + p = Popen(cmd, stdout=PIPE, stderr=PIPE, shell=True) + err = p.wait() + if err: + raise Exception('please install mysql', cmd) + + if host is None: host = self.__host if port is None: port = self.__port