[…] ちなみにlogrotateで定期的にローテートする場合はこうやるそうだ。 MySQL の slowlog を logrotate する方法 | Carpe Diem […]
The latest from the MySQL community
Ideas, releases, practical guides, and perspectives from the people building with MySQL.
複数のmy.cnfがデフォルトで読み込まれるパスに置いてあったり、
中で!includeしたり、直接オプションを渡したりしたとき。
同じパラメータが指定されている場合は、常に後勝ち(後から設定された方で上書き)です。
Linux系のMySQLでは、
/etc/my.cnf -> /etc/mysql/my.cnf -> SYSCONFDIR/my.cnf ->
$MYSQL_HOME/my.cnf -> defaults-extra-fileで指定されたファイル ->
$HOME/.my.cnf -> 直接渡したオプション
の順番で読み込まれる。
優先順位で考えると、後勝ちなので後ろが一番強い。
SYSCONFDIRはcmakeのオプションで指定するものの、デフォルトは/usr/local/mysql/etcになっていた(5.6.8-rcのsource)
$MYSQL_HOMEは、mysqld_safeがごにょごにょして/usrに置き換えられる場合が多い(CentOS) …
今まではinnodb_log_file_sizeを変えると
テーブルスペースとログファイル両方の再作成が必要だったのが、すごくお手軽な感じになっていた!
121109 10:39:01 [Warning] InnoDB: Resizing redo log from 2*8192
to 2*16384 pages, LSN=1626134
121109 10:39:01 [Warning] InnoDB: Starting to delete and rewrite
log files.
121109 10:39:01 [Note] InnoDB: Setting log file ./ib_logfile101
size to 256 MB
InnoDB: Progress in MB: 100 200
121109 10:39:02 [Note] InnoDB: Setting log file ./ib_logfile1
size to 256 MB
InnoDB: Progress in MB: 100 200
121109 10:39:02 [Note] InnoDB: Renaming log file ./ib_logfile101
to ./ib_logfile0
121109 10:39:02 [Warning] InnoDB: New log files created,
LSN=1626134
テンポラリファイル作って内容を移してリネームしている様子。
…
rpmでMySQL-serverをインストールすると、最後に自動でmysql_install_dbが流れるけれど、
mysql_install_dbに--random-passwordsオプションというのが出来て、rpmでインストールした時にはそのオプションが有効な状態で流れるとのこと。これによって、rootの初期パスワードが空っぽじゃなくなる。 ⇒/root/.mysql_secretというファイルに書いてあった。 カレントディレクトリじゃなくてホームディレクトリに作るっぽい。 中身はこんなの。
# cat /root/.mysql_secret# The random password set for the root
user at Fri Nov 9 10:15:47 2012 (local
time): EtZjQcMc
# mysql -pEtZjQcMcmysql> SELECT user,host,password FROM
mysql.user;ERROR 1820 (HY000): You must SET PASSWORD before
executing this …
1.ARCHITECTURE
The Databus architecture is split into four logical
components.
- a fetcher which extracts changes from the data source or another Databus component,
- a log store which caches this change stream,
- a snapshot store which stores a moving snapshot of the stream, and
- a subscription client which pulls change events seamlessly across the various components and surfaces them up to the application.
2.Oracle Adapter
A simple approach to get the change log from Oracle is to
have a timestamp …
> Mikiya Okuno さん
コメントありがとうございます!
なるほど、そうなんですね!
binlog_formatはセッションごとに設定できる変数なのでSET GLOBALで設定した内容を反映するにはクライアントの再接続が必要かと。
オラクルではMySQLのマニュアルを完全に日本語化することができておらず、更新情報もぜんぜん追いついていないのが現状だ。(その代わり、英語のマニュアルは素晴らしいのひとことだ。)オラクルは関知していないのだが、NRIのオープンソース情報サイトであるOpenStandiaで、MySQLの更新履歴が日本語化されている。英語はちょっと苦手だなーという人はこちらを覗いてみると良いだろう。ただでさえ更新履歴は膨大な情報である。日本語化されることによって助かるという人も多いのではないだろうか。もちろん、社内公用語が英語になるなどの事情で英語を勉強したい人は、敢えて英語のマニュアルだけを読むべきであろう。