pull/109/head
Mr Chen 6 years ago
parent f3c75fd00c
commit 73ac11e244
  1. 5
      class/core/plugins_api.py
  2. 13
      plugins/mysql/index.py

@ -7,9 +7,14 @@ import public
import re
import json
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import threading
import multiprocessing
from flask import request

@ -186,13 +186,16 @@ def status():
def start():
path = os.path.dirname(os.getcwd())
cmd = path + "/redis/bin/redis-server"
cmd = cmd + " " + path + "/redis/redis.conf"
initMysql = getServerDir() + '/scripts/mysql_install_db ' + '--basedir=' + \
getServerDir() + ' --datadir=' + getServerDir() + '/bin/mysql/data'
return initMysql
cmd = getServerDir() + '/bin/mysqld_safe ' + getServerDir() + \
'/conf/my.cnf ' + '--user=mysql&'
data = public.execShell(cmd)
if data[0] == '':
return 'ok'
return 'fail'
return 'stop'
return data[0]
def stop():

Loading…
Cancel
Save