20
20

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

my.confの設定

Last updated at Posted at 2013-12-21

環境
OS: mac lion
パッケージ管理: homebrew

my.confの設定
参考: MySQL5.6公式サイト
http://www.karakaram.com/install-mysql56-homebrew

mysql5.6 クエリログ設定
参考: http://dev.mysql.com/doc/refman/5.6/en/query-log.html

インストール後にMySQLに関するメッセージを見る

>> brew info mysql

mysqlは下記のpathにある。
/usr/local/Cellar/

バイナリログ・データベースの保管場所
/usr/local/var/mysql

バイナリログの状態を確認

> show master logs;

my.cnfの設定

[client]
port=3306
socket=/tmp/mysql.sock

[mysqld]
port=3306
socket=/tmp/mysql.sock
key_buffer_size=16M
max_allowed_packet=8M
pid-file = /usr/local/var/mysql/MacOSX.local.pid

#エラーログの確認
log-error=/var/log/mysql/error.log

#クエリログを表示
general_log=1
general_log_file=/var/log/mysql/query.log

# バイナリログを残す日数
expire_logs_days = 2

# basic
datadir = /usr/local/var/mysql
tmpdir = /tmp
character-set-server = utf8
default-storage-engine = InnoDB
innodb_buffer_pool_size = 128M

[mysqldump]
quick

実行ファイル場所

/usr/local/Cellar/mysql/5.6.14/bin

バイナリログ削除参照ページ
http://wiki.bit-hive.com/tomizoo/pg/MySQL%20%A5%D0%A5%A4%A5%CA%A5%EA%A5%ED%A5%B0%A4%CE%BA%EF%BD%FC

20
20
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
20
20

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?