php 尝试启动 MySQL 时出现“错误 1067:进程意外终止”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4758844/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
"Error 1067: The process terminated unexpectedly" when trying to start MySQL
提问by Egglabs
I'm using Windows 7 and running XAMPP MySQL SVC service. I'm seeing the following error:
我正在使用 Windows 7 并运行 XAMPP MySQL SVC 服务。我看到以下错误:
Windows could not start the Mysql service on Local Computer.
Error 1067: The process terminated unexpectedly.
Windows 无法在本地计算机上启动 Mysql 服务。
错误 1067:进程意外终止。
What does this mean, and how can I fix it?
这是什么意思,我该如何解决?
采纳答案by Vladislav Vaintroub
Examine error log (start eventvwr.msc). MySQL typically writes something to the Application log.
检查错误日志(启动 eventvwr.msc)。MySQL 通常会向应用程序日志写入一些内容。
In very rare cases it does not write anything (I'm only aware of one particular bug http://bugs.mysql.com/bug.php?id=56821, where services did not work at all). There is also error log file, normally named .err in the data directory that has the same info as written to windows error log.
在极少数情况下,它不写任何内容(我只知道一个特定的错误http://bugs.mysql.com/bug.php?id=56821,其中服务根本无法工作)。还有错误日志文件,通常在数据目录中命名为 .err,其信息与写入 Windows 错误日志的信息相同。
回答by mohsen.rmz
You need to:
你需要:
- stop the MySQL service:
- Open
mysql path\data
- Remove both
ib_logfile0
andib_logfile1
. - Restart the service
- 停止 MySQL 服务:
- 打开
mysql path\data
- 删除
ib_logfile0
和ib_logfile1
。 - 重启服务
回答by Volodymyr Levytskyi
I had the same problem. I am using mysql 5.6.11. To solve this problem I had to change my-default.inifile in mysql-5.6.11-win32folder So I just pasted the following lines under line [mysqld]
我有同样的问题。我正在使用 mysql 5.6.11。为了解决这个问题,我不得不更改mysql-5.6.11-win32文件夹中的my-default.ini文件所以我只是在 [mysqld] 行下粘贴了以下几行
basedir="D:\mysql-5.6.11-win32\"
datadir="D:\mysql-5.6.11-win32\data\"
port=3306
server-id=1
bind-address=127.0.0.1
Options basedir and datadir need to be modified for mysql location.
mysql 位置需要修改basedir 和datadir 选项。
回答by Yohanes AI
Don't forget to check
不要忘记检查
innodb_data_home_dir = <your_directory_location>
innodb_log_group_home_dir = <your_directory_location>
on my.ini files. Wrong set value for these two variable make mysql process terminated and produce error 1067
. Also check eventvwr.msc
and mysql_error.log
for detail error.
在 my.ini 文件上。这两个变量的错误设置值会导致 mysql 进程终止并产生错误1067
。还要检查eventvwr.msc
和mysql_error.log
了解详细错误。
回答by Jan Stanicek
Same problem here. After analysing log reports via eventvwr.mscI found, that logging files were placed in folder which requires admin rights to update, so files cannot be created and install and startup process could not proceed.
同样的问题在这里。通过eventvwr.msc分析日志报告后,我发现日志文件被放置在需要管理员权限更新的文件夹中,因此无法创建文件,安装和启动过程无法继续。
So checking eventlog was very usefull.
所以检查事件日志非常有用。
回答by Giraldi
I had the same problem but I was confused with @Vladislav's answer and couldn't seem to find the solution from that. Of course, my problem may not be exactly the same as I encountered the problem when trying to upgrade XAMPP, but it also gave the same Error 1067message.
我遇到了同样的问题,但我对@Vladislav 的回答感到困惑,似乎无法从中找到解决方案。当然,我的问题可能与我尝试升级XAMPP时遇到的问题不完全相同,但也给出了相同的错误1067消息。
With further search I found this:
通过进一步搜索,我发现了这个:
The answer from that is straightforward, that is, to completely clean up the folder, which doesn't always happen. As in regards to XAMPP, I guess I backed up the necessary files first (data folderfrom mysql folder and the htdocs folder). Uninstall XAMPP. Check the xampp folder for any content that remains and delete everything. You may want to reboot afterwards, just in case. Then reinstall XAMPP. Copy the backed-up folders back to their respective places, and hopefully, mySql will work again in XAMPP.
答案很简单,即完全清理文件夹,这并不总是发生。至于 XAMPP,我想我首先备份了必要的文件(来自 mysql 文件夹和htdocs 文件夹的数据文件夹)。卸载 XAMPP。检查 xampp 文件夹中是否有任何剩余内容并删除所有内容。您可能想在之后重新启动,以防万一。然后重新安装 XAMPP。将备份的文件夹复制回各自的位置,希望 mySql 能够在 XAMPP 中再次运行。
This should solve the issue.
这应该可以解决问题。
回答by Matty J
I get this problem from time to time, and when I do, I have been able to solve it by using a backup of the database folder(s) that give the problem.
我不时遇到这个问题,当我这样做时,我已经能够通过使用出现问题的数据库文件夹的备份来解决它。
When you check your 'Event Viewer > Windows Log > Application', if you see an error:
当您检查“事件查看器 > Windows 日志 > 应用程序”时,如果看到错误:
InnoDB: Attempted to open a previously opened tablespace. Previous tablespace [database]/[table] uses space ID: 59 at filepath: .\[database]\[table].ibd. Cannot open tablespace [different db]/[different table] which uses space ID: 59 at filepath: .\[different db]/[different table].ibd
InnoDB: Attempted to open a previously opened tablespace. Previous tablespace [database]/[table] uses space ID: 59 at filepath: .\[database]\[table].ibd. Cannot open tablespace [different db]/[different table] which uses space ID: 59 at filepath: .\[different db]/[different table].ibd
Then what works for me, is delete the first mentioned [database] folder in your MySQL data directory, and copy the backup of that database folder to where it was previously.
然后对我有用的是删除 MySQL 数据目录中第一个提到的 [database] 文件夹,并将该数据库文件夹的备份复制到以前的位置。
Then start MySQL, and it starts again for me, without this 1067 error.
然后启动 MySQL,它再次为我启动,没有这个 1067 错误。
回答by eric A
I just went throught same issue and I solved it the following way. 1 - found the .err file which logs all mysql issues, in win7, located under programData\MySQL\MySQL Server 5.6\data\ 2 - Check the last entries from the file and, in my case, I found the error was coming from a flag (audit-log) that I set to "true" from the workbench interface the day before! 3 - went into the my.ini file, and removed audit-log=ON. 4 - launched mysql service and it worked!!
我刚刚遇到了同样的问题,并通过以下方式解决了它。1 - 在 win7 中找到记录所有 mysql 问题的 .err 文件,位于 programData\MySQL\MySQL Server 5.6\data\ 2 - 检查文件中的最后一个条目,就我而言,我发现错误来自我前一天从工作台界面设置为“true”的标志(审计日志)!3 - 进入 my.ini 文件,并删除 audit-log=ON。4 - 启动了 mysql 服务并且成功了!!
回答by DavidTaubmann
I've got the same problem, and what worked for me is in THIS OTHER ANSWER.
我遇到了同样的问题,对我有用的是THIS OTHER ANSWER。
I didn't replicated it here because it is NOT A CORRECT THING TO DO.
我没有在这里复制它,因为这不是正确的做法。
Basically is a re-install being sure to delete everything very well and using 32 bit versions.
基本上是重新安装,确保很好地删除所有内容并使用 32 位版本。
回答by inf3rno
I had the same error. I checked the error logs: C:\ProgramData\MySQL\MySQL Server 5.5\data\inf3rno-PC.err
. According to them
我有同样的错误。我检查了错误日志:C:\ProgramData\MySQL\MySQL Server 5.5\data\inf3rno-PC.err
. 根据他们
170208 1:06:25 [Note] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: Shutdown complete
170208 1:10:44 [Note] Plugin 'FEDERATED' is disabled.
170208 1:10:44 InnoDB: The InnoDB memory heap is disabled
170208 1:10:44 InnoDB: Mutexes and rw_locks use Windows interlocked functions
170208 1:10:44 InnoDB: Compressed tables use zlib 1.2.3
170208 1:10:44 InnoDB: Error: unable to create temporary file; errno: 2
170208 1:10:44 [ERROR] Plugin 'InnoDB' init function returned error.
170208 1:10:44 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
170208 1:10:44 [ERROR] Unknown/unsupported storage engine: INNODB
170208 1:10:44 [ERROR] Aborting
I think the important part here
我认为这里的重要部分
170208 1:10:44 InnoDB: Error: unable to create temporary file; errno: 2
I changed the TMP
and TEMP
env variables from C:\Windows\Temp
to %USERPROFILE%\AppData\Local\Temp
yesterday, because I was unable to compress a directory and according to many post the solution is that. Now compression works, but mysql and apparently nod32 complains that they cannot create temporary files...
我将TMP
和TEMP
env 变量从昨天更改C:\Windows\Temp
为%USERPROFILE%\AppData\Local\Temp
昨天,因为我无法压缩目录,根据许多帖子,解决方案是。现在压缩工作,但 mysql 和显然 nod32 抱怨他们不能创建临时文件......
I added tmpdir=c:/server/mytmp
to C:\Program Files\MySQL\MySQL Server 5.5\my.ini
. And after that started the service again with services.msc. It is okay now.
我添加tmpdir=c:/server/mytmp
到C:\Program Files\MySQL\MySQL Server 5.5\my.ini
. 然后用services.msc 再次启动服务。现在没事了。
So this can be a possible cause as well. I strongly suggest to everybody encountering this problem to check the error logs.
所以这也可能是一个可能的原因。我强烈建议遇到此问题的每个人检查错误日志。