mysql update

pull/149/head
midoks 3 years ago
parent eb58a61859
commit d6bd6a5c42
  1. 4
      plugins/mysql/conf/my.cnf
  2. 3
      plugins/mysql/conf/my5.7.cnf
  3. 3
      plugins/mysql/conf/my8.0.cnf
  4. 27
      plugins/mysql/index.py

@ -5,6 +5,9 @@ port = 3306
socket = {$SERVER_APP_PATH}/mysql.sock
[mysqld]
sha256_password_private_key_path=mysql.pem
sha256_password_public_key_path=mysql.pub
pid-file = {$SERVER_APP_PATH}/data/mysql.pid
user = mysql
port = 3306
@ -80,6 +83,7 @@ innodb_max_dirty_pages_pct = 90
innodb_read_io_threads = 1
innodb_write_io_threads = 1
innodb_file_per_table=1
innodb_large_prefix = 1
secure-file-priv={$SERVER_APP_PATH}/tmp

@ -6,6 +6,9 @@ socket = {$SERVER_APP_PATH}/mysql.sock
default-character-set = UTF8MB4
[mysqld]
sha256_password_private_key_path=mysql.pem
sha256_password_public_key_path=mysql.pub
pid-file = {$SERVER_APP_PATH}/data/mysql.pid
user = mysql
port = 3306

@ -6,7 +6,10 @@ socket = {$SERVER_APP_PATH}/mysql.sock
default-character-set = UTF8MB4
[mysqld]
sha256_password_private_key_path=mysql.pem
sha256_password_public_key_path=mysql.pub
default_authentication_plugin=mysql_native_password
pid-file = {$SERVER_APP_PATH}/data/mysql.pid
user = mysql
port = 3306

@ -146,6 +146,26 @@ def pMysqlDb():
return db
def makeInitRsaKey(version=''):
datadir = getServerDir() + "/data"
mysql_pem = datadir + "/mysql.pem"
if not os.path.exists(mysql_pem):
rdata = mw.execShell(
'cd ' + datadir + ' && openssl genrsa -out mysql.pem 1024')
# print(data)
rdata = mw.execShell(
'cd ' + datadir + ' && openssl rsa -in mysql.pem -pubout -out mysql.pub')
# print(rdata)
if not mw.isAppleSystem():
mw.execShell('cd ' + datadir + ' && chmod 400 mysql.pem')
mw.execShell('cd ' + datadir + ' && chmod 444 mysql.pub')
mw.execShell('cd ' + datadir + ' && chown mysql:mysql mysql.pem')
mw.execShell('cd ' + datadir + ' && chown mysql:mysql mysql.pub')
def initDreplace(version=''):
initd_tpl = getInitdTpl(version)
@ -486,8 +506,11 @@ def my8cmd(version, method):
def appCMD(version, action):
if version == '8.0' or version == '5.7':
return my8cmd(version, action)
return myOp(version, action)
status = my8cmd(version, action)
else:
status = myOp(version, action)
makeInitRsaKey(version)
return status
def start(version=''):

Loading…
Cancel
Save