“错误 1067:进程意外终止”当尝试启动 MySQL 时

发布于 2024-10-12 21:28:16 字数 164 浏览 4 评论 0原文

我正在使用 Windows 7 并运行 XAMPP MySQL SVC 服务。我看到以下错误:

Windows 无法启动本地计算机上的 Mysql 服务。

错误 1067:进程意外终止。

这是什么意思?我该如何解决它?

I'm using Windows 7 and running XAMPP MySQL SVC service. I'm seeing the following error:

Windows could not start the Mysql service on Local Computer.

Error 1067: The process terminated unexpectedly.

What does this mean, and how can I fix it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(18

如歌彻婉言 2024-10-19 21:28:16

您需要:

  1. 停止 MySQL 服务:
  2. 打开 mysql path\data
  3. 删除 ib_logfile0ib_logfile1
  4. 重新启动服务

You need to:

  1. stop the MySQL service:
  2. Open mysql path\data
  3. Remove both ib_logfile0 and ib_logfile1.
  4. Restart the service
烟雨凡馨 2024-10-19 21:28:16

检查错误日志(启动 eventvwr.msc)。 MySQL 通常会向应用程序日志写入一些内容。

在极少数情况下,它不会写任何内容(我只知道一个特定的错误 http: //bugs.mysql.com/bug.php?id=56821,其中服务根本无法工作)。还有一个错误日志文件,通常在数据目录中命名为 .err,其信息与写入 Windows 错误日志的信息相同。

Examine error log (start eventvwr.msc). MySQL typically writes something to the Application log.

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.

无名指的心愿 2024-10-19 21:28:16

我也有同样的问题。我使用的是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

选项 basedir 和 datadir 下,需要修改 mysql 位置。

I had the same problem. I am using mysql 5.6.11.
To solve this problem I had to change my-default.ini file in mysql-5.6.11-win32 folder
So I just pasted the following lines under line [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.

萝莉病 2024-10-19 21:28:16

不要忘记检查

innodb_data_home_dir = <your_directory_location>
innodb_log_group_home_dir = <your_directory_location>

my.ini 文件。这两个变量的错误设置值会使 mysql 进程终止并产生错误1067。另请检查 eventvwr.mscmysql_error.log 以了解详细错误。

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.

赴月观长安 2024-10-19 21:28:16

我遇到了同样的问题,但我对 @Vladislav 的答案感到困惑,并且似乎无法从中找到解决方案。当然,我的问题可能与我尝试升级 XAMPP 时遇到的问题不完全相同,但它也给出了相同的 Error 1067 消息。

通过进一步搜索,我发现了这个:

https ://serverfault.com/questions/214435/error-1067-the-process-termerated-unexpectedly-when-trying-to-install-mysql-on

答案很简单,那就是完全清理文件夹,这并不总是发生。至于XAMPP,我想我首先备份了必要的文件(mysql文件夹中的数据文件夹htdocs文件夹)。卸载 XAMPP。检查 xampp 文件夹中是否有任何剩余内容并删除所有内容。您可能想稍后重新启动,以防万一。然后重新安装 XAMPP。将备份的文件夹复制回各自的位置,希望 mySql 能够在 XAMPP 中再次运行。

这应该可以解决问题。

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 1067 message.

With further search I found this:

https://serverfault.com/questions/214435/error-1067-the-process-terminated-unexpectedly-when-trying-to-install-mysql-on

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 folder from 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.

This should solve the issue.

爱的十字路口 2024-10-19 21:28:16

这里同样的问题。通过 eventvwr.msc 分析日志报告后,我发现日志文件放置在需要管理员权限才能更新的文件夹中,因此无法创建文件,安装和启动过程无法继续。

所以检查事件日志非常有用。

Same problem here. After analysing log reports via eventvwr.msc I 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.

So checking eventlog was very usefull.

何以畏孤独 2024-10-19 21:28:16

我时常遇到这个问题,当我遇到这个问题时,我已经能够通过使用出现问题的数据库文件夹的备份来解决它。

当您检查“事件查看器>”时Windows 日志 >应用程序”,如果您看到错误:

InnoDB:尝试打开先前打开的表空间。上一个表空间 [数据库]/[表] 使用空间 ID:59,文件路径:.\[数据库]\[表].ibd。无法打开表空间 [不同的数据库]/[不同的表],它在文件路径: .\[不同的数据库]/[不同的表].ibd 使用空间 ID:59

那么对我有用的是删除第一个提到的 [ MySQL 数据目录中的 [database] 文件夹,然后将该数据库文件夹的备份复制到之前的位置。

然后启动MySQL,它再次为我启动,没有这个1067错误。

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:

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.

Then start MySQL, and it starts again for me, without this 1067 error.

痴骨ら 2024-10-19 21:28:16

我几乎有同样的问题。在日志文件中我发现:

110903  9:09:39  InnoDB: 1.1.4 started; log sequence number 1595675
110903  9:09:40 [ERROR] Fatal error: Can't open and lock privilege tables: Incorrect key file for table 'user'; try to repair it

显然用户表已损坏。我用另一个副本替换了它(user.frm; user.MYD; user.MYI in mysql\data\mysql)
这对我有用。

ps:我正在使用xampp。

I had practically the same problem. in the log file I found this:

110903  9:09:39  InnoDB: 1.1.4 started; log sequence number 1595675
110903  9:09:40 [ERROR] Fatal error: Can't open and lock privilege tables: Incorrect key file for table 'user'; try to repair it

Apparently the user table has been corrupted. I replaced it with another copy (user.frm ; user.MYD ; user.MYI in mysql\data\mysql)
and thats works for me.

ps: am using xampp.

林空鹿饮溪 2024-10-19 21:28:16

搜索并销毁(或谨慎移动)任何影响mysql服务失败的my.ini文件(Windows或程序文件)。还可以使用 netstat 或 portqry 工具检查端口 3306 是否被使用。这应该有帮助。此外,如果存在文件系统问题,您可以运行检查磁盘。

Search and destroy (or move cautiously) any my.ini files (windows or program files), which is affecting the mysql service failure. also check port 3306 is used by using either netstat or portqry tool. this should help. Also if there is a file system issue you can run check disk.

止于盛夏 2024-10-19 21:28:16

我刚刚经历了同样的问题,并通过以下方式解决了它。
1 - 在win7中找到记录所有mysql问题的.err文件,位于programData\MySQL\MySQL Server 5.6\data\下
2 - 检查文件中的最后条目,在我的例子中,我发现错误来自我前一天在工作台界面中设置为“true”的标志(审核日志)!
3 - 进入 my.ini 文件,并删除audit-log=ON。
4 - 启动mysql服务并且它工作了!

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!!

榕城若虚 2024-10-19 21:28:16

我也遇到了同样的问题,对我有用的是这个其他答案

我没有在这里复制它,因为它不是正确的做法

基本上是重新安装,确保删除所有内容并使用 32 位版本。

I've got the same problem, and what worked for me is in 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.

娇妻 2024-10-19 21:28:16

我有同样的错误。我检查了错误日志: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

我认为这里重要的部分是

170208  1:10:44  InnoDB: Error: unable to create temporary file; errno: 2

我将 TMPTEMP 环境变量从 C:\Windows\Temp 更改为 %昨天 USERPROFILE%\AppData\Local\Temp ,因为我无法压缩目录,根据许多帖子,解决方案是这样的。现在压缩可以工作,但是 mysql 和显然 nod32 抱怨它们无法创建临时文件...

我将 tmpdir=c:/server/mytmp 添加到 C:\Program Files\MySQL\MySQL Server 5.5\my.ini。然后使用 services.msc 再次启动服务。现在没事了。

所以这也可能是一个可能的原因。我强烈建议遇到此问题的每个人检查错误日志。

I had the same error. I checked the error logs: C:\ProgramData\MySQL\MySQL Server 5.5\data\inf3rno-PC.err. According to them

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...

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.

So this can be a possible cause as well. I strongly suggest to everybody encountering this problem to check the error logs.

酒与心事 2024-10-19 21:28:16

我使用安装文件来修复。这对我有用

I use install file to repair. it works for me

凤舞天涯 2024-10-19 21:28:16

请检查存储数据库的驱动器上的可用空间。就我而言,由于驱动器空间较少,服务已停止。

please check the space available on drive where the db is stored. in my case it was stopped the service due to less space on drive.

一个人的夜不怕黑 2024-10-19 21:28:16

这个问题有很多解决方案。这对我有用

右键单击​​服务 ->属性->以系统帐户登录。

输入图片此处描述

There are many solutions for the problem. This worked for me

Right click on Service -> Properties -> Log on as system account.

enter image description here

明明#如月 2024-10-19 21:28:16

关于这篇文章我的问题已经解决。

我按照以下步骤操作。

  1. 启动“运行”对话框,输入 Regedit 并单击 Enter。
  2. 打开注册表编辑器窗口后,转到路径:HKEY_LOCAL_MACHINE >系统>当前控制集>服务
  3. 从列表中找到出现错误1067的服务(这里以MariaDB服务为例)。右键单击它,单击导出将其保存到桌面或任何地方,命名为 MariaDB,然后单击保存。我们做这个过程就是为服务创建一个备份。
  4. 然后右键单击该服务并选择删除将其从服务列表中删除。
  5. 使用管理权限运行命令提示符,输入 sfc /scannow,然后按 Enter 对 Windows 系统执行扫描。
  6. 重新启动计算机。然后,找到您保存的注册表项的备份,右键单击它并选择合并。
  7. 通过Windows搜索栏打开“服务”窗口,右键单击该服务,然后单击“开始”。(如果您还没有看到您的服务,请在合并后再次重新启动计算机)

祝您好运!

Regarding this article my problem has been solved.

I followed the below steps.

  1. Launch the Run dialog, input Regedit and click Enter.
  2. After opening the Registry Editor window, head to the path: HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services
  3. Find the service that has the error 1067 from the list (Here, we take the MariaDB service as an example). Right-click on it, click Export to save it to the desktop or any place, name it MariaDB and click Save. We do this process is to create a backup for the service.
  4. Then right-click on the service and choose Delete to remove it from the services list.
  5. Run Command Prompt with administrative rights, input sfc /scannow, and press Enter to perform a scan for your Windows system.
  6. Restart your computer. Then, find the backup of the registry key you have saved, right-click on it and choose Merge.
  7. Open the Services window via the Windows search bar, right-click on the service and click Start.(If you don't see your service yet there, restart your computer after merge once again)

Good luck!

静若繁花 2024-10-19 21:28:16
  • 停止 MySQL 服务。

  • “C:\xampp\mysql\backup”复制并替换文件夹“mysql”
    到“C:\xampp\mysql\data”

    100% 工作

  • Stop the MySQL service.

  • Copy and replace folder "mysql" from "C:\xampp\mysql\backup"
    to "C:\xampp\mysql\data".

    100% working

沙与沫 2024-10-19 21:28:16

在 win8 的 XAMPP 服务器中运行 mysql 的错误原因对我来说就是这样。

如果在 XAMPP 中安装 MariaDB First Stop MySql

并安装 MariaDB 时显示错误,那么现在没有问题了...祝你有美好的一天...

error reason running mysql in XAMPP server in win8 thats hapen for me.

if error display when you install MariaDB First Stop MySql in XAMPP

and install MariaDB there is not problem now...have a nice day...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文