pull/149/head
midoks 3 years ago
parent 3a4622d8b7
commit 391be0f52b
  1. 4
      class/plugin/orm.py
  2. 2
      plugins/mysql/conf/my8.0.cnf
  3. 10
      plugins/mysql/index.py

@ -26,11 +26,11 @@ class ORM:
try:
self.__DB_CONN = pymysql.connect(host=self.__DB_HOST, user=self.__DB_USER, passwd=self.__DB_PASS,
port=int(self.__DB_PORT), charset=self.__DB_CHARSET, connect_timeout=1, cursorclass=pymysql.cursors.DictCursor)
port=int(self.__DB_PORT), charset=self.__DB_CHARSET, connect_timeout=1, unix_socket=self.__DB_SOCKET, cursorclass=pymysql.cursors.DictCursor)
except Exception as e:
self.__DB_HOST = '127.0.0.1'
self.__DB_CONN = pymysql.connect(host=self.__DB_HOST, user=self.__DB_USER, passwd=self.__DB_PASS,
port=int(self.__DB_PORT), charset=self.__DB_CHARSET, connect_timeout=1, cursorclass=pymysql.cursors.DictCursor)
port=int(self.__DB_PORT), charset=self.__DB_CHARSET, connect_timeout=1, unix_socket=self.__DB_SOCKET, cursorclass=pymysql.cursors.DictCursor)
self.__DB_CUR = self.__DB_CONN.cursor()
return True

@ -51,7 +51,7 @@ slow-query-log-file={$SERVER_APP_PATH}/data/mysql-slow.log
long_query_time=10
log_queries_not_using_indexes=1
log_slow_admin_statements=1
log_slow_slave_statements=1
log_slow_replica_statements=1
binlog_expire_logs_seconds=2592000
relay-log=mdserver

@ -732,16 +732,6 @@ def isSqlError(mysqlMsg):
return None
def mapToList(map_obj):
# map to list
try:
if type(map_obj) != list and type(map_obj) != str:
map_obj = list(map_obj)
return map_obj
except:
return []
def __createUser(dbname, username, password, address):
pdb = pMysqlDb()

Loading…
Cancel
Save