endaYuan 发表于 2015-04-21 11:10

mysql 正常启动,但是错误日志里面很多错误


系统:linux Centos
内存:1G

错误日志:150421 10:07:07 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2015-04-21 10:07:08 0 TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-04-21 10:07:08 1294 Plugin 'FEDERATED' is disabled.
2015-04-21 10:07:08 1294 InnoDB: Using mutexes to ref count buffer pool pages
2015-04-21 10:07:08 1294 InnoDB: The InnoDB memory heap is disabled
2015-04-21 10:07:08 1294 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
2015-04-21 10:07:08 1294 InnoDB: Memory barrier is not used
2015-04-21 10:07:08 1294 InnoDB: Compressed tables use zlib 1.2.3
2015-04-21 10:07:08 1294 InnoDB: Using Linux native AIO
2015-04-21 10:07:08 1294 InnoDB: Not using CPU crc32 instructions
2015-04-21 10:07:08 1294 InnoDB: Initializing buffer pool, size = 50.0M
2015-04-21 10:07:08 1294 InnoDB: Completed initialization of buffer pool
2015-04-21 10:07:08 1294 InnoDB: Highest supported file format is Barracuda.
2015-04-21 10:07:08 1294 InnoDB: The log sequence numbers 70380470 and 70380470 in ibdata files do not match the log sequence number 70641371 in the ib_logfiles!
2015-04-21 10:07:08 1294 InnoDB: Database was not shutdown normally!
2015-04-21 10:07:08 1294 InnoDB: Starting crash recovery.
2015-04-21 10:07:08 1294 InnoDB: Reading tablespace information from the .ibd files...
2015-04-21 10:07:09 1294 InnoDB: Restoring possible half-written data pages
2015-04-21 10:07:09 1294 InnoDB: from the doublewrite buffer...
InnoDB: 1 transaction(s) which must be rolled back or cleaned up
InnoDB: in total 1 row operations to undo
InnoDB: Trx id counter is 462848
2015-04-21 10:07:10 1294 InnoDB: 128 rollback segment(s) are active.
2015-04-21 10:07:10 1294 InnoDB: Waiting for purge to start
InnoDB: Starting in background the rollback of uncommitted transactions
2015-04-21 10:07:10 93cbcb70InnoDB: Rolling back trx with id 462388, 1 rows to undo
2015-04-21 10:07:10 1294 InnoDB: Rollback of trx with id 462388 completed
2015-04-21 10:07:10 93cbcb70InnoDB: Rollback of non-prepared transactions completed
2015-04-21 10:07:10 1294 InnoDB: 5.6.23 started; log sequence number 70641371
2015-04-21 10:07:10 1294 RSA private key file not found: /var/lib/mysql//private_key.pem. Some authentication plugins will not work.
2015-04-21 10:07:10 1294 RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.
2015-04-21 10:07:10 1294 Server hostname (bind-address): '*'; port: 3306
2015-04-21 10:07:10 1294 IPv6 is not available.
2015-04-21 10:07:10 1294    - '0.0.0.0' resolves to '0.0.0.0';
2015-04-21 10:07:10 1294 Server socket created on IP: '0.0.0.0'.
2015-04-21 10:07:10 1294 Event Scheduler: Loaded 0 events
2015-04-21 10:07:10 1294 /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.6.23-enterprise-commercial-advanced'socket: '/var/lib/mysql/mysql.sock'port: 3306MySQL Enterprise Server - Advanced Edition (Commercial)
my.cnf 配置文件
socket=/var/lib/mysql/mysql.sock


datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
innodb_buffer_pool_size=50m
read_buffer_size = 64K
read_rnd_buffer_size = 1M
sort_buffer_size = 2M
join_buffer_size = 2M

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0


log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pidfree -m 内存使用情况             total       used       free   shared    buffers   cached
Mem:          1892       1098      794          0         21      114
-/+ buffers/cache:      961      931
Swap:            0          0          0
新人,求解

liaosnet 发表于 2015-04-21 14:43

:sleepy::sleepy:没什么问题,数据库上次关闭不是正常的关闭,启动的时候进行了恢复操作。。

endaYuan 发表于 2015-04-21 15:06

谢谢哈~回复 2# liaosnet


   

lyhabc 发表于 2015-04-22 14:56

本帖最后由 lyhabc 于 2015-04-23 00:08 编辑

从这里日志可以看到,因为你不是正常关闭mysql,所以mysql在重启的时候会进行 crash recovery,把未提交的事务回滚,已提交的重做
请看下面日志
InnoDB: The log sequence numbers 70380470 and 70380470 in ibdata files do not match the log sequence number 70641371 in the ib_logfiles!
2015-04-21 10:07:08 1294 InnoDB: Database was not shutdown normally!
2015-04-21 10:07:08 1294 InnoDB: Starting crash recovery.
2015-04-21 10:07:08 1294 InnoDB: Reading tablespace information from the .ibd files...
2015-04-21 10:07:09 1294 InnoDB: Restoring possible half-written data pages
2015-04-21 10:07:09 1294 InnoDB: from the doublewrite buffer...
InnoDB: 1 transaction(s) which must be rolled back or cleaned up
InnoDB: in total 1 row operations to undo
InnoDB: Trx id counter is 462848
2015-04-21 10:07:10 1294 InnoDB: 128 rollback segment(s) are active.
2015-04-21 10:07:10 1294 InnoDB: Waiting for purge to start
InnoDB: Starting in background the rollback of uncommitted transactions

做完回滚和重做之后,数据库恢复在线状态了,ready for connection

你的数据库是没有问题的
页: [1]
查看完整版本: mysql 正常启动,但是错误日志里面很多错误