linux下mysql重启后失败,求帮助!急!!
[root@AY1312021459324652d5Z init.d]# vim /etc/my.cnf
[root@AY1312021459324652d5Z init.d]# mysqld start
2013-12-11 15:37:10 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2013-12-11 15:37:10 2113 [Note] Plugin 'FEDERATED' is disabled.
mysqld: Table 'mysql.plugin' doesn't exist
2013-12-11 15:37:10 2113 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2013-12-11 15:37:10 2113 [Note] InnoDB: The InnoDB memory heap is disabled
2013-12-11 15:37:10 2113 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2013-12-11 15:37:10 2113 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-12-11 15:37:10 2113 [Note] InnoDB: Using Linux native AIO
2013-12-11 15:37:10 2113 [Note] InnoDB: Using CPU crc32 instructions
2013-12-11 15:37:10 2113 [Note] InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
2013-12-11 15:37:10 2113 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2013-12-11 15:37:10 2113 [ERROR] Plugin 'InnoDB' init function returned error.
2013-12-11 15:37:10 2113 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2013-12-11 15:37:10 2113 [ERROR] mysqld: unknown variable 'default-character-set=utf8'
2013-12-11 15:37:10 2113 [ERROR] Aborting
2013-12-11 15:37:10 2113 [Note] Binlog end
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'partition'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'ARCHIVE'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'BLACKHOLE'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_METRICS'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_CMPMEM'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_CMP'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_LOCKS'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'INNODB_TRX'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'CSV'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'MEMORY'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'MyISAM'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'MRG_MYISAM'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'sha256_password'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'mysql_old_password'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'mysql_native_password'
2013-12-11 15:37:10 2113 [Note] Shutting down plugin 'binlog'
2013-12-11 15:37:10 2113 [Note] mysqld: Shutdown complete
[root@AY1312021459324652d5Z init.d]# sestatus
SELinux status: disabled
[root@AY1312021459324652d5Z init.d]# chcon -t httpd_sys_content_t mysqld
chcon: can't apply partial context to unlabeled file mysqld
[root@AY1312021459324652d5Z init.d]#
[解决办法]
你应该是升级了mysql,但没有修改配置文件
在my.cnf中加入
[mysqld]
explicit_defaults_for_timestamp=true
其他错误,按照提示修改即可。
[解决办法]
[root@AY1312021459324652d5Z init.d]# mysqld start --user=root
2013-12-11 17:12:01 3828 [Note] Plugin 'FEDERATED' is disabled.
mysqld: Table 'mysql.plugin' doesn't exist
2013-12-11 17:12:01 3828 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2013-12-11 17:12:01 3828 [Note] InnoDB: The InnoDB memory heap is disabled