今天在启动myql时候突然报了一个这个错误,感觉非常的奇怪,mysql可以启动一会,mysql.sock又消失了,找了很多方法,有可能:1,磁盘空间不足 2,目录权限不够
查看一下错误日志,终于看出问题
2015-11-10 10:28:56 23732 [Note] InnoDB: 5.6.15 started; log sequence number 385737380720
2015-11-10 10:28:56 23732 [Note] Recovering after a crash using mysql-bin2015-11-10 10:28:56 23732 [Note] Starting crash recovery...2015-11-10 10:28:56 23732 [Note] Crash recovery finished.2015-11-10 10:28:58 23732 [Note] Server hostname (bind-address): '0.0.0.0'; port: 33062015-11-10 10:28:58 23732 [Note] - '0.0.0.0' resolves to '0.0.0.0';2015-11-10 10:28:58 23732 [Note] Server socket created on IP: '0.0.0.0'.2015-11-10 10:28:59 23732 [Warning] 'proxies_priv' entry '@ root@ts' ignored in --skip-name-resolve mode.2015-11-10 10:28:59 23732 [Note] Event Scheduler: Loaded 8 events2015-11-10 10:28:59 23732 [Note] /usr/local/mysql/bin/mysqld: ready for connections.Version: '5.6.15-log' socket: '/usr/local/mysql/mysql.sock' port: 3306 Source distribution151110 10:29:27 mysqld_safe Number of processes running now: 0151110 10:29:27 mysqld_safe mysqld restarted2015-11-10 10:29:28 24038 [Note] Plugin 'FEDERATED' is disabled.2015-11-10 10:29:28 24038 [Note] InnoDB: The InnoDB memory heap is disabled2015-11-10 10:29:28 24038 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins2015-11-10 10:29:28 24038 [Note] InnoDB: Compressed tables use zlib 1.2.32015-11-10 10:29:28 24038 [Note] InnoDB: Not using CPU crc32 instructions2015-11-10 10:29:29 24038 [Note] InnoDB: Initializing buffer pool, size = 64.0M2015-11-10 10:29:29 24038 [Note] InnoDB: Completed initialization of buffer pool2015-11-10 10:29:29 24038 [Note] InnoDB: Highest supported file format is Barracuda.2015-11-10 10:29:29 24038 [Note] InnoDB: The log sequence numbers 299946710457 and 299946710457 in ibdata files do not match the log sequence number 385737380730 in the ib_logfiles!2015-11-10 10:29:29 24038 [Note] InnoDB: Database was not shutdown normally!“The InnoDB memory heap is disabled”表明有可能是mysql不正常关闭造成的,解决方法:
解决办法:
删除掉 ibdata* ,ib_logfile* ,所有的日志。重启后可启动数据库,因数据库是非正常关闭引起的。所有会造成数据丢失。 要做好备份工作