【MySQL学习笔记】MySQL 启动过程

下面是mysql在启动时产生的日志,在我的机器上的路径是:/data/mysqldata/3306/mysql-error.log

内容如下:

 

160928 15:17:19 mysqld_safe Starting mysqld daemon with databases from /data/mysqldata/3306/data

2016-09-28 15:17:30 2719 [Note] Plugin 'FEDERATED' is disabled.
2016-09-28 15:17:30 2719 [Note] InnoDB: The InnoDB memory heap is disabled

2016-09-28 15:17:30 2719 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-09-28 15:17:30 2719 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-09-28 15:17:30 2719 [Note] InnoDB: Using CPU crc32 instructions

2016-09-28 15:17:30 2719 [Note] InnoDB: Initializing buffer pool, size = 300.0M
2016-09-28 15:17:31 2719 [Note] InnoDB: Completed initialization of buffer pool
2016-09-28 15:17:31 2719 [Note] InnoDB: Highest supported file format is Barracuda.

2016-09-28 15:17:31 2719 [Note] InnoDB: The log sequence numbers 1626028 and 1626028 in ibdata files do not match the log sequence number 1626038 in the ib_logfiles!
2016-09-28 15:17:31 2719 [Note] InnoDB: Database was not shutdown normally!
2016-09-28 15:17:31 2719 [Note] InnoDB: Starting crash recovery.
2016-09-28 15:17:31 2719 [Note] InnoDB: Reading tablespace information from the .ibd files...
2016-09-28 15:17:31 2719 [Note] InnoDB: Restoring possible half-written data pages 
2016-09-28 15:17:31 2719 [Note] InnoDB: from the doublewrite buffer...
2016-09-28 15:17:32 2719 [Note] InnoDB: 128 rollback segment(s) are active.
2016-09-28 15:17:32 2719 [Note] InnoDB: Waiting for purge to start
2016-09-28 15:17:32 2719 [Note] InnoDB: 5.6.12 started; log sequence number 1626038
2016-09-28 15:17:32 2719 [Note] Recovering after a crash using /data/mysqldata/3306/binlog/mysql-bin
2016-09-28 15:17:32 2719 [Note] Starting crash recovery...
2016-09-28 15:17:32 2719 [Note] Crash recovery finished.

2016-09-28 15:17:32 2719 [Note] Server hostname (bind-address): '*'; port: 3306
2016-09-28 15:17:32 2719 [Note] IPv6 is available.
2016-09-28 15:17:32 2719 [Note]   - '::' resolves to '::';
2016-09-28 15:17:32 2719 [Note] Server socket created on IP: '::'.
2016-09-28 15:17:33 2719 [Note] Event Scheduler: Loaded 0 events

2016-09-28 15:17:33 2719 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.6.12-log'  socket: '/data/mysqldata/3306/mysql.sock'  port: 3306  Source distribution


注释:

 

 

--mysqld_safe启动mysqld守护进程,数据库路径为/data/mysqldata/3306/data
160928 15:17:19 mysqld_safe Starting mysqld daemon with databases from /data/mysqldata/3306/data

--federated引擎不可用,innodb内存堆不可用
2016-09-28 15:17:30 2719 [Note] Plugin 'FEDERATED' is disabled.
2016-09-28 15:17:30 2719 [Note] InnoDB: The InnoDB memory heap is disabled

--互斥体和读写锁使用 gcc内建的原子锁,使用zlib 1.2.3库来压缩表,使用crc32指令
2016-09-28 15:17:30 2719 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-09-28 15:17:30 2719 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-09-28 15:17:30 2719 [Note] InnoDB: Using CPU crc32 instructions

--初始化buffer pool,大小为300M,最高支持的文件格式为 Barracuda
2016-09-28 15:17:30 2719 [Note] InnoDB: Initializing buffer pool, size = 300.0M
2016-09-28 15:17:31 2719 [Note] InnoDB: Completed initialization of buffer pool
2016-09-28 15:17:31 2719 [Note] InnoDB: Highest supported file format is Barracuda.

--日志序列号为1626028,数据文件中的日志序列号于日志文件中的 不匹配
2016-09-28 15:17:31 2719 [Note] InnoDB: The log sequence numbers 1626028 and 1626028 in ibdata files do not match the log sequence number 1626038 in the ib_logfiles!

--数据库没有正常关闭,开始崩溃恢复
2016-09-28 15:17:31 2719 [Note] InnoDB: Database was not shutdown normally!
2016-09-28 15:17:31 2719 [Note] InnoDB: Starting crash recovery.

--从 ibd文件中读取表空间信息。
2016-09-28 15:17:31 2719 [Note] InnoDB: Reading tablespace information from the .ibd files...

--恢复可能只写了一半的数据页,这里是从双写buffer中来恢复,这个双写buffer是为了专门解决partial page write问题而设计的一个机制
2016-09-28 15:17:31 2719 [Note] InnoDB: Restoring possible half-written data pages 
2016-09-28 15:17:31 2719 [Note] InnoDB: from the doublewrite buffer...

--回滚段可用,等待清除开始
2016-09-28 15:17:32 2719 [Note] InnoDB: 128 rollback segment(s) are active.
2016-09-28 15:17:32 2719 [Note] InnoDB: Waiting for purge to start

--innodb启动,日志序列号1626038
2016-09-28 15:17:32 2719 [Note] InnoDB: 5.6.12 started; log sequence number 1626038

--在崩溃之后,从使用binlog来恢复
2016-09-28 15:17:32 2719 [Note] Recovering after a crash using /data/mysqldata/3306/binlog/mysql-bin
2016-09-28 15:17:32 2719 [Note] Starting crash recovery...
2016-09-28 15:17:32 2719 [Note] Crash recovery finished.


2016-09-28 15:17:32 2719 [Note] Server hostname (bind-address): '*'; port: 3306
2016-09-28 15:17:32 2719 [Note] IPv6 is available.
2016-09-28 15:17:32 2719 [Note]   - '::' resolves to '::';
2016-09-28 15:17:32 2719 [Note] Server socket created on IP: '::'.
2016-09-28 15:17:33 2719 [Note] Event Scheduler: Loaded 0 events

2016-09-28 15:17:33 2719 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.6.12-log'  socket: '/data/mysqldata/3306/mysql.sock'  port: 3306  Source distribution

 

posted @ 2016-10-13 17:55  小木瓜瓜瓜  阅读(163)  评论(0编辑  收藏  举报