"Error 1067: The process terminated unexpectedly" when trying to start MySQL
Asked Answered
C

18

17

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?

Cns answered 21/1, 2011 at 12:34 Comment(2)
Also true for WCF windows services that produce the same error.Brian
What makes you think that this problem is related to PHP after all?Community
H
13

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.

Hoarfrost answered 7/2, 2011 at 19:39 Comment(0)
Q
37

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
Qnp answered 13/3, 2014 at 19:47 Comment(4)
This really isn't a good solution as it will delete most (if not all) tables from your database.Picker
This worked for me and my database tables didn't got got deleted.Crawford
This worked for me, and no data loss. The files are recreated on restart. on Windows the delete files is at ProgramData. I don't know the reason.Sharpeyed
Very helpfull answer.... This worked for me too and database tables didn't got got deletedNovikoff
H
13

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.

Hoarfrost answered 7/2, 2011 at 19:39 Comment(0)
W
7

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.

William answered 27/5, 2013 at 16:34 Comment(2)
I added drive letter basedir = "H:/xampp/mysql" datadir = "H:/xampp/mysql/data" and it workedEmelia
I had to remove the "port=3306", did not work with it. Now is perfect.Tracy
K
2

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.

Kirchhoff answered 30/8, 2017 at 7:15 Comment(0)
L
1

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.

Lita answered 9/8, 2011 at 14:26 Comment(0)
P
1

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.

Petepetechia answered 9/10, 2013 at 9:39 Comment(1)
Thanks a lot Jan! You saved the day! In my service, the logon user for the service was NETWORK. Seems this user does not have permissions to write to the disk where it needed. The event viewer showed this line. "Can't create test file C:\Program Files\MySQL\MySQL Server 5.6\data\XXX.lower-test" I just changed the logon user to Logon as local system account and spoof... it worked.Integrator
D
1

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.

Doge answered 11/8, 2014 at 2:23 Comment(0)
T
0

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.

Tuxedo answered 3/9, 2011 at 9:37 Comment(0)
A
0

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.

Artina answered 5/2, 2014 at 8:51 Comment(0)
C
0

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

Copper answered 30/5, 2015 at 8:16 Comment(0)
T
0

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.

Treadle answered 10/6, 2016 at 16:14 Comment(0)
C
0

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.

Coraliecoraline answered 8/2, 2017 at 1:15 Comment(0)
T
0

I use install file to repair. it works for me

Transplant answered 10/2, 2017 at 7:10 Comment(0)
B
0

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.

Brucebrucellosis answered 10/5, 2017 at 7:6 Comment(0)
R
0

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

Reveal answered 17/10, 2017 at 8:51 Comment(0)
C
0

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!

Capo answered 17/5, 2021 at 9:4 Comment(0)
C
0
  • Stop the MySQL service.

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

    100% working

Communalize answered 25/1 at 5:40 Comment(0)
A
-1

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

Asynchronism answered 17/5, 2020 at 13:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.