MYSQL不会运行

时间:2014-10-11 19:56:14

标签: mysql windows installation

当我启动MYSQL时,我得到了这个?

20:43:41  [mysql]   Error: MySQL shutdown unexpectedly.
20:43:41  [mysql]   This may be due to a blocked port, missing dependencies, 
20:43:41  [mysql]   improper privileges, a crash, or a shutdown by another method.
20:43:41  [mysql]   Press the Logs button to view error logs and check
20:43:41  [mysql]   the Windows Event Viewer for more clues
20:43:41  [mysql]   If you need more help, copy and post this
20:43:41  [mysql]   entire log window on the forums

有人可以帮帮我吗? MYSQL启动大约5秒然后关闭......我找不到任何修复方法,所以我决定在这里发布,如果你能解决,请不要犹豫,发表评论。

错误日志:

2014-10-11 20:43:36 2124 [Note] Plugin 'FEDERATED' is disabled.
2014-10-11 20:43:36 8c8 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2014-10-11 20:43:36 2124 [Note] InnoDB: Using atomics to ref count buffer pool pages
2014-10-11 20:43:36 2124 [Note] InnoDB: The InnoDB memory heap is disabled
2014-10-11 20:43:36 2124 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2014-10-11 20:43:36 2124 [Note] InnoDB: Memory barrier is not used
2014-10-11 20:43:36 2124 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-10-11 20:43:36 2124 [Note] InnoDB: Not using CPU crc32 instructions
2014-10-11 20:43:36 8c8  InnoDB: Error: unable to create temporary file; errno: 2
2014-10-11 20:43:36 2124 [ERROR] Plugin 'InnoDB' init function returned error.
2014-10-11 20:43:36 2124 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2014-10-11 20:43:36 2124 [ERROR] Unknown/unsupported storage engine: InnoDB
2014-10-11 20:43:36 2124 [ERROR] Aborting

2014-10-11 20:43:36 2124 [Note] Binlog end
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'partition'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_METRICS'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_CMPMEM'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_CMP'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_LOCKS'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'INNODB_TRX'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'BLACKHOLE'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'ARCHIVE'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'MRG_MYISAM'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'MyISAM'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'MEMORY'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'CSV'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'sha256_password'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'mysql_old_password'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'mysql_native_password'
2014-10-11 20:43:36 2124 [Note] Shutting down plugin 'binlog'
2014-10-11 20:43:36 2124 [Note] C:\Users\Administrador\Documents\cpps\mysql\bin\mysqld.exe: Shutdown complete

1 个答案:

答案 0 :(得分:0)

您并未提供有关您如何达到这一点的更多信息。从错误消息中可以清楚地看出,InnoDB存储引擎代码无法创建必要的临时文件。

当我重新安装MySQL时,我遇到了类似的问题,并尝试从即将退役的硬盘驱动器移动data文件夹。这是一个目录保护问题。

不要做我刚开始做的事情:尝试使用保护措施(chmod等)。真是疯狂 - 认真。如果您已完成此操作,请卸载并重新安装MySQL。

尝试在控制台模式下运行mysqld以弄清楚发生了什么。这是在这里记录的。

http://dev.mysql.com/doc/refman/5.6/en/windows-start-command-line.html

注意您可能应该使用具有管理权限的cmd提示符来执行此操作。启动InnoDB可能是因为您没有足够的权限来尝试运行mysqld。要使用管理权限启动命令提示符,请确保已使用管理帐户登录,然后按照这些说明进行操作。 http://technet.microsoft.com/en-us/library/cc947813(v=ws.10).aspx

如果mysqld以这种方式运行时启动正常,您可以尝试--install将其作为Windows服务运行。请参阅此文章:http://dev.mysql.com/doc/refman/5.6/en/windows-start-service.html

它可能已经作为服务安装,在这种情况下,您尝试安装它将失败。如果发生这种情况,请先使用--remove,然后使用--install

接下来,要确保它作为服务运行,请尝试打开该服务(启动/运行services.msc)。找到MySQL服务。尝试停止它并使用服务管理器启动它。如果它成功启动,那就太棒了。

最后,确保该服务具有自动启动类型(或自动延迟...)。然后,重新启动Windows框并确保启动MySql。