Skip to content

Instantly share code, notes, and snippets.

@mysqlboy
mysqlboy / schema-change.md
Created October 10, 2022 06:50
KL Schema Change Request

Schema Change

Review:

Dimensions of table to be altered:

+------------------+----------+----------+--------------+
| tbl              | Size_MB  | rows_mil | data_free_MB |
+------------------+----------+----------+--------------+
| cheateo.bot_logs | 56741.95 |  25.4484 |      1255.00 |
@mysqlboy
mysqlboy / table_size.sql
Last active July 13, 2021 10:36
MySQL table sizes
-- top 10
SELECT
CONCAT(table_schema,'.',table_name) AS `tbl`,
round(((data_length + index_length) / POW(1024,2)), 2) `Size_MB`
FROM
information_schema.TABLES
ORDER BY
(data_length + index_length)
DESC limit 10;
# Start netcat on port 9999 on joiner
nc -l -p 9999 | xbstream -x -C .
# Start the backup from donor
innobackupex \
--compress \
--compress-threads=4 \
--parallel=4 \
--stream=xbstream . \
| nc 9999
Mon Jun 11 11:47:30 UTC 2018
@mysqlboy
mysqlboy / keybase.md
Created August 9, 2017 17:36
keybase.md

Keybase proof

I hereby claim:

  • I am mysqlboy on github.
  • I am eroomydna (https://keybase.io/eroomydna) on keybase.
  • I have a public key ASBjJVvfnvo6eKSfSAeBILQKgXT1aDQNiIl7GUECJbvHWwo

To claim this, I am signing this object:

<AUDIT_RECORD>
<NAME>Query</NAME>
<RECORD>742037377_2014-05-09T14:25:53</RECORD>
<TIMESTAMP>2014-05-09T14:27:41 UTC</TIMESTAMP>
<COMMAND_CLASS>show_variables</COMMAND_CLASS>
<CONNECTION_ID>3</CONNECTION_ID>
<STATUS>0</STATUS>
<SQLTEXT>show global variables like 'audit%'</SQLTEXT>
<USER>root[root] @ localhost []</USER>
<HOST>localhost</HOST>