mariadb update
This commit is contained in:
parent
c33ef57f6a
commit
2afb7c69a5
|
|
@ -0,0 +1,4 @@
|
|||
[mysqld]
|
||||
# SHOW GLOBAL VARIABLES LIKE '%gtid%'
|
||||
gtid_mode=ON
|
||||
enforce_gtid_consistency=ON
|
||||
|
|
@ -5,6 +5,9 @@ port = 33106
|
|||
socket = {$SERVER_APP_PATH}/mysql.sock
|
||||
|
||||
[mysqld]
|
||||
|
||||
!include {$SERVER_APP_PATH}/etc/mode/classic.cnf
|
||||
|
||||
pid-file = {$SERVER_APP_PATH}/data/mysql.pid
|
||||
user = mysql
|
||||
port = 33106
|
||||
|
|
@ -12,6 +15,8 @@ socket = {$SERVER_APP_PATH}/mysql.sock
|
|||
basedir = {$SERVER_APP_PATH}
|
||||
datadir = {$SERVER_APP_PATH}/data
|
||||
log-error = {$SERVER_APP_PATH}/data/error.log
|
||||
server-id = {$SERVER_ID}
|
||||
|
||||
default_storage_engine = InnoDB
|
||||
|
||||
key_buffer_size = 8M
|
||||
|
|
@ -76,7 +81,7 @@ innodb_flush_log_at_trx_commit = 1
|
|||
innodb_lock_wait_timeout = 120
|
||||
innodb_max_dirty_pages_pct = 90
|
||||
innodb_read_io_threads = 1
|
||||
innodb_write_io_threads = 1
|
||||
innodb_write_io_threads = 2
|
||||
innodb_file_per_table=1
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
<p onclick="myLogs();">日志</p>
|
||||
<p onclick="pluginLogs('mariadb',$('.plugin_version').attr('version'),'show_log');">慢日志</p>
|
||||
<p onclick="dbList()">管理列表</p>
|
||||
<p onclick="masterOrSlaveConf($('.plugin_version').attr('version'))">主从配置</p>
|
||||
</div>
|
||||
<div class="bt-w-con pd15">
|
||||
<div class="soft-man-con"></div>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1300,9 +1300,12 @@ def getDbInfo():
|
|||
tables = pdb.query('show tables from `%s`' % db_name)
|
||||
|
||||
ret = {}
|
||||
data_sum = pdb.query(
|
||||
"select sum(DATA_LENGTH)+sum(INDEX_LENGTH) as sum_size from information_schema.tables where table_schema='%s'" % db_name)
|
||||
data = data_sum[0]['sum_size']
|
||||
sql = "select sum(DATA_LENGTH)+sum(INDEX_LENGTH) as sum_size from information_schema.tables where table_schema='%s'" % db_name
|
||||
data_sum = pdb.query(sql)
|
||||
|
||||
data = 0
|
||||
if data_sum[0]['sum_size'] != None:
|
||||
data = data_sum[0]['sum_size']
|
||||
|
||||
ret['data_size'] = mw.toSize(data)
|
||||
ret['database'] = db_name
|
||||
|
|
@ -1310,14 +1313,22 @@ def getDbInfo():
|
|||
ret3 = []
|
||||
table_key = "Tables_in_" + db_name
|
||||
for i in tables:
|
||||
table = pdb.query(
|
||||
"show table status from `%s` where name = '%s'" % (db_name, i[table_key]))
|
||||
tb_sql = "show table status from `%s` where name = '%s'" % (db_name, i[
|
||||
table_key])
|
||||
table = pdb.query(tb_sql)
|
||||
|
||||
tmp = {}
|
||||
tmp['type'] = table[0]["Engine"]
|
||||
tmp['rows_count'] = table[0]["Rows"]
|
||||
tmp['collation'] = table[0]["Collation"]
|
||||
data_size = table[0]["Avg_row_length"] + table[0]["Data_length"]
|
||||
|
||||
data_size = 0
|
||||
if table[0]['Avg_row_length'] != None:
|
||||
data_size = table[0]['Avg_row_length']
|
||||
|
||||
if table[0]['Data_length'] != None:
|
||||
data_size = table[0]['Data_length']
|
||||
|
||||
tmp['data_byte'] = data_size
|
||||
tmp['data_size'] = mw.toSize(data_size)
|
||||
tmp['table_name'] = table[0]["Name"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue