web-dev-qa-db-ja.com

mysqld.logファイルを読み取る方法は?

誰かがmysqld.logの読み方を教えてもらえますか?

3番目の列について知りたいです。
mysqlを起動/停止するたびにdifferent出力が表示されるため。
誰かが私に説明してくれることを願っています:).

以下に例を示します。

18614とは?

2018-08-09 23:08:03 18614 [Note] InnoDB: Using CPU crc32 instructions
2018-08-09 23:08:03 18614 [Note] InnoDB: Initializing buffer pool, size = 80.0G
2018-08-09 23:08:07 18614 [Note] InnoDB: Completed initialization of buffer pool
2018-08-09 23:08:08 18614 [Note] InnoDB: Highest supported file format is Barracuda.
2018-08-09 23:10:36 18614 [Note] InnoDB: 128 rollback segment(s) are active.
2018-08-09 23:10:36 18614 [Note] InnoDB: Waiting for purge to start
2018-08-09 23:10:36 18614 [Note] InnoDB: 5.6.36 started; log sequence number 6889901435830
2018-08-09 23:10:36 7fc3935fe700 InnoDB: Loading buffer pool(s) from .//ib_buffer_pool
2018-08-09 23:10:36 18614 [Note] Server hostname (bind-address): '*'; port: 33060
2018-08-09 23:10:36 18614 [Note] IPv6 is available.
2018-08-09 23:10:36 18614 [Note]   - '::' resolves to '::';
2018-08-09 23:10:36 18614 [Note] Server socket created on IP: '::'.
2018-08-09 23:10:36 18614 [Note] Event Scheduler: Loaded 0 events
2018-08-09 23:10:36 18614 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.6.36-log'  socket: '/var/lib/mysql/mysql.sock'  port: 33060  MySQL Community Server (GPL)


20239とは?

2018-08-09 23:12:23 20239 [ERROR] Plugin 'InnoDB' init function returned error.
2018-08-09 23:12:23 20239 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-08-09 23:12:23 20239 [ERROR] Unknown/unsupported storage engine: InnoDB
2018-08-09 23:12:23 20239 [ERROR] Aborting


100508とは何ですか?

2018-08-19 23:35:32 100508 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2018-08-19 23:35:32 100508 [Note] Shutting down plugin 'MyISAM'
2018-08-19 23:35:32 100508 [Note] Shutting down plugin 'CSV'
2018-08-19 23:35:32 100508 [Note] Shutting down plugin 'MEMORY'
2018-08-19 23:35:32 100508 [Note] Shutting down plugin 'MRG_MYISAM'
2018-08-19 23:35:32 100508 [Note] Shutting down plugin 'sha256_password'
2018-08-19 23:35:32 100508 [Note] Shutting down plugin 'mysql_old_password'
2018-08-19 23:35:32 100508 [Note] Shutting down plugin 'mysql_native_password'
2018-08-19 23:35:32 100508 [Note] Shutting down plugin 'binlog'
2018-08-19 23:35:32 100508 [Note] /usr/sbin/mysqld: Shutdown complete


228とは?

2018-08-19 23:38:15 2283 [Note] InnoDB: 5.6.36 started; log sequence number 6952861241977
2018-08-19 23:38:15 7f5dbffff700 InnoDB: Loading buffer pool(s) from .//ib_buffer_pool
2018-08-19 23:38:15 2283 [Note] Server hostname (bind-address): '*'; port: 33060
2018-08-19 23:38:15 2283 [Note] IPv6 is available.
2018-08-19 23:38:15 2283 [Note]   - '::' resolves to '::';
2018-08-19 23:38:15 2283 [Note] Server socket created on IP: '::'.
2018-08-19 23:38:16 2283 [Note] Event Scheduler: Loaded 0 events
2018-08-19 23:38:16 2283 [Note] /usr/sbin/mysqld: ready for connections.

ありがとうございました。

2
hazard74

https://dev.mysql.com/doc/refman/8.0/en/error-log-format.html のとおり、これはthread_idです。

このログライターは、従来のエラーログ出力を生成します。次の形式を使用してメッセージを書き込みます。

タイムスタンプthread_id [重大度] [err_code] [サブシステム]メッセージ

[および]角かっこ文字は、メッセージ形式のリテラル文字です。フィールドがオプションであることを示すものではありません。

2
akuzminsky