Skip to content

Instantly share code, notes, and snippets.

View hironomiu's full-sized avatar
🍕
🍔 🍔 🍔 🍔

hironomiu hironomiu

🍕
🍔 🍔 🍔 🍔
View GitHub Profile
@hironomiu
hironomiu / gist:8418671
Last active March 2, 2020 14:58
パフォーマンスチューニング

パフォーマンスチューニング

スロークエリ

設定確認

# mysql
mysql> show global variables like '%slow_query%';
+---------------------+-------------------------------+
| Variable_name       | Value                         |
+---------------------+-------------------------------+
| slow_query_log      | ON                            |
@hironomiu
hironomiu / gist:8295933
Last active January 2, 2016 11:19
トランザクション

トランザクション

準備

  • ターミナルは二つ起動すること以後ターミナルA、ターミナルBと呼ぶ
  • master,slave構成の場合はmasterのみで作業を行います

ターミナルA

# mysql

mysql> use test
@hironomiu
hironomiu / gist:8019721
Last active December 31, 2015 17:19
レプリケーション

レプリケーション

事前準備 PORTの解放確認

3306が解放されていない場合以下を実施

# vi /etc/sysconfig/iptables
+ -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
# service iptables restart