Permalink
Browse files

Merge pull request #14 from shibayu36/mysql-slowquery

mysqlのスロークエリログを出す設定
  • Loading branch information...
shibayu36 committed Sep 16, 2018
2 parents 249525e + f42adf5 commit 85ad0867388724d5b3c0ef70488b587091cb349f
Showing with 10 additions and 1 deletion.
  1. +5 −0 conf/my.cnf
  2. +1 −1 sokkyou/deploy.sh
  3. +4 −0 sokkyou/deploy_mysql.sh
@@ -21,3 +21,8 @@ pid-file=/var/run/mariadb/mariadb.pid
[mysqld]
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
# END ANSIBLE MANAGED BLOCK mariadb
# [終了前] slow_query_log = 0にしましょう
slow_query_log = 1
slow_query_log_file = /var/log/mariadb/mysql-slow.log
long_query_time = 0
@@ -6,7 +6,7 @@ for REMOTE in ${BACKEND[@]}; do
rsync -avz --exclude-from=.gitignore --exclude='.git' -e 'ssh' . isucon@$REMOTE:/home/isucon/torb/
ssh isucon@$REMOTE "cd /home/isucon/torb/webapp/perl && ~/local/perl/bin/carton install && sudo sudo systemctl restart torb.perl.service && sudo sysctl -p"
ssh isucon@$REMOTE "cd /home/isucon/torb/webapp/perl && ~/local/perl/bin/carton install && sudo systemctl restart torb.perl.service && sudo sysctl -p"
SLACK ":ok_hand:"
done
@@ -6,3 +6,7 @@ REMOTE=$DB
SLACK "deploy mysql ($REMOTE $USER)"
RSYNC conf/my.cnf /etc/my.cnf
ssh "isucon@$REMOTE" "sudo systemctl restart mariadb"
./sokkyou/deploy.sh
SLACK ":ok_hand"

0 comments on commit 85ad086

Please sign in to comment.