Mysql ошибка 1067 процесс был неожиданно завершен

I ran into the same errors. Similar approach for me. From what I can tell, there is something weird going on with the reference to the datadir in the my.ini file. Even when I manually edited it I could not seem to have any effect on it, until I blew EVERYTHING AWAY. Wish I had better news…do a DB backup first.

For me the key to getting this to work was:

1) Remove the previous installation from settings->control panel. Restart your machine.

2) Once machine comes back up, forcefully delete the previous installation directory.
[mine is C:\apps\MySQL\MySQLServer-5.5\, as I REFUSE to use c:\program files\..]

3) Forcefully delete the previous datadir directory [mine was c:\data\mysql].

4) Forcefully delete the previous default data directory [C:\Documents and Settings\All Users\Application Data\MySQL].

5) Re-run the install, selected the same installation directory. Skip the instance configurator/wizard at the end of the install.

6) Make sure the ../bin directory gets added to the path. Verify it.

7) Manually run the instance configurator/wizard.
Set the root password, port [3306].
It will try to start it. Again, mine FAILED to start
[duh! nothing new there!!!]

8) Now, manually edit the my.ini file in the install directory, and correct the datadir setting to be [datadir="C:/Data/MySQL/"] MATCH CAPITALIZATION !!!!

9) Verify the service is setup correctly via the command-prompt [sc qc mysql <enter>].
Should look like:

C:\dev\cmdz>sc qc mysql

[SC] GetServiceConfig SUCCESS

SERVICE_NAME: mysql
        TYPE               : 10  WIN32_OWN_PROCESS
        START_TYPE         : 2   AUTO_START
        ERROR_CONTROL      : 1   NORMAL
        BINARY_PATH_NAME   : "C:\apps\MySQL\MySQLServer-5.5\bin\mysqld" --defaults-file="C:\apps\MySQL\MySQLServer-5.5\my.ini" MySQL
        LOAD_ORDER_GROUP   :
        TAG                : 0
        DISPLAY_NAME       : MySQL
        DEPENDENCIES       :
        SERVICE_START_NAME : LocalSystem

10) Copy the contents of the default data-directory created under C:\Documents and Settings\All Users\Application Data\MySQL [basically everything in this directory to your desired data directory c:\data\mysql]. Make sure you get the C:\Documents and Settings\All Users\Application Data\MySQL\mysql directory. This has host.frm file, and others.
You should end up with a directory now of c:\data\MySQL\mysql...

11) Rename the default directory
C:\Documents and Settings\All Users\Application Data\MySQL
To
C:\Documents and Settings\All Users\Application Data\MySQLxxx
So it cannot find it…

12) Say a quick prayer…

13) Give it a kick start from command line with [net start mysql]

That got it working for me…

Best of Luck!

I ran into the same errors. Similar approach for me. From what I can tell, there is something weird going on with the reference to the datadir in the my.ini file. Even when I manually edited it I could not seem to have any effect on it, until I blew EVERYTHING AWAY. Wish I had better news…do a DB backup first.

For me the key to getting this to work was:

1) Remove the previous installation from settings->control panel. Restart your machine.

2) Once machine comes back up, forcefully delete the previous installation directory.
[mine is C:\apps\MySQL\MySQLServer-5.5\, as I REFUSE to use c:\program files\..]

3) Forcefully delete the previous datadir directory [mine was c:\data\mysql].

4) Forcefully delete the previous default data directory [C:\Documents and Settings\All Users\Application Data\MySQL].

5) Re-run the install, selected the same installation directory. Skip the instance configurator/wizard at the end of the install.

6) Make sure the ../bin directory gets added to the path. Verify it.

7) Manually run the instance configurator/wizard.
Set the root password, port [3306].
It will try to start it. Again, mine FAILED to start
[duh! nothing new there!!!]

8) Now, manually edit the my.ini file in the install directory, and correct the datadir setting to be [datadir="C:/Data/MySQL/"] MATCH CAPITALIZATION !!!!

9) Verify the service is setup correctly via the command-prompt [sc qc mysql <enter>].
Should look like:

C:\dev\cmdz>sc qc mysql

[SC] GetServiceConfig SUCCESS

SERVICE_NAME: mysql
        TYPE               : 10  WIN32_OWN_PROCESS
        START_TYPE         : 2   AUTO_START
        ERROR_CONTROL      : 1   NORMAL
        BINARY_PATH_NAME   : "C:\apps\MySQL\MySQLServer-5.5\bin\mysqld" --defaults-file="C:\apps\MySQL\MySQLServer-5.5\my.ini" MySQL
        LOAD_ORDER_GROUP   :
        TAG                : 0
        DISPLAY_NAME       : MySQL
        DEPENDENCIES       :
        SERVICE_START_NAME : LocalSystem

10) Copy the contents of the default data-directory created under C:\Documents and Settings\All Users\Application Data\MySQL [basically everything in this directory to your desired data directory c:\data\mysql]. Make sure you get the C:\Documents and Settings\All Users\Application Data\MySQL\mysql directory. This has host.frm file, and others.
You should end up with a directory now of c:\data\MySQL\mysql...

11) Rename the default directory
C:\Documents and Settings\All Users\Application Data\MySQL
To
C:\Documents and Settings\All Users\Application Data\MySQLxxx
So it cannot find it…

12) Say a quick prayer…

13) Give it a kick start from command line with [net start mysql]

That got it working for me…

Best of Luck!

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?

Community's user avatar

asked Jan 21, 2011 at 12:34

Egglabs's user avatar

1

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

Lucas Zamboulis's user avatar

answered Mar 13, 2014 at 19:47

mohsen.rmz's user avatar

mohsen.rmzmohsen.rmz

3611 gold badge3 silver badges2 bronze badges

4

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.

answered Feb 7, 2011 at 19:39

Vladislav Vaintroub's user avatar

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.

answered May 27, 2013 at 16:34

Volodymyr Levytskyi's user avatar

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.

answered Aug 30, 2017 at 7:15

Yohanim's user avatar

YohanimYohanim

3,3399 gold badges52 silver badges92 bronze badges

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.

Community's user avatar

answered Aug 9, 2011 at 14:26

Giraldi's user avatar

GiraldiGiraldi

16.5k6 gold badges33 silver badges53 bronze badges

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.

answered Oct 9, 2013 at 9:39

Jan Stanicek's user avatar

Jan StanicekJan Stanicek

1,2011 gold badge14 silver badges30 bronze badges

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.

answered Aug 11, 2014 at 2:23

Matty J's user avatar

Matty JMatty J

3,11632 silver badges31 bronze badges

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.

answered Sep 3, 2011 at 9:37

Salem's user avatar

SalemSalem

3311 gold badge7 silver badges21 bronze badges

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.

answered Feb 5, 2014 at 8:51

Atul Deshmukh's user avatar

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

answered May 30, 2015 at 8:16

eric A's user avatar

eric Aeric A

7866 silver badges6 bronze badges

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.

Community's user avatar

answered Jun 10, 2016 at 16:14

DavidTaubmann's user avatar

DavidTaubmannDavidTaubmann

3,2232 gold badges34 silver badges43 bronze badges

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.

answered Feb 8, 2017 at 1:15

inf3rno's user avatar

inf3rnoinf3rno

25k11 gold badges115 silver badges197 bronze badges

I use install file to repair. it works for me

answered Feb 10, 2017 at 7:10

Rico Nguyen's user avatar

Rico NguyenRico Nguyen

3416 silver badges11 bronze badges

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.

answered May 10, 2017 at 7:06

Amar's user avatar

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

answered Oct 17, 2017 at 8:51

Cloy's user avatar

CloyCloy

2,14123 silver badges32 bronze badges

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!

answered May 17, 2021 at 9:04

Taylan Yuksel's user avatar

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…

answered May 17, 2020 at 13:52

jozefina's user avatar

Сообщение об ошибке 1067 «Процесс был неожиданно завершен» возникает при попытке выполнить действие, которое вызывает запуск службы. Чаще происходит при запуске службы SQL и ей подобных. Узнаем подробнее, как ее исправить.

Предоставление учетной записи управлять службой

Проблема часто связана с различными разрешениями и для ее решения предоставьте текущей учетной записи пользователя доступ к элементам управления службой. Это решение примените в первую очередь. Поскольку оно универсально и может быть использовано независимо от того, какая служба отображает сообщение об ошибке 1067.

Нажмите Win + R и выполните команду services.msc.

Найдите службу, которая выдает ошибку, щелкните на нее правой кнопкой мыши и перейдите в Свойства. На вкладке Общие посмотрите состояние. Если она запущена, остановите ее нажатием на соответствующую кнопку.

Затем на вкладке Вход в систему кликните на «Обзор».

В поле ввода имен выбираемых объектов наберите имя текущей учетной записи, кликните на «Проверить имена», чтобы проверить ее правильность, и нажмите на «ОК». Либо выберите имя с помощью кнопок Дополнительно – Поиск.

Затем введите пароль, и примените изменения на «ОК». Закройте окно, и перезагрузите компьютер. В большинстве случаев, этим способом удается исправить ошибку с кодом 1607.

Переустановка службы

В этом решении используем более продвинутый способ перезапуска службы, которая была повреждена и ее не удается исправить в свойствах.

Откройте редактор реестра выполнением команды regedit из окна Win + R.

На левой панели перейдите к разделу:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

В разделе Services найдите проблемную службу, кликните на нее правой кнопкой мыши и удалите. Подтвердите все запросы, которые могут возникнуть в процессе удаления, и перезагрузите компьютер

Если не удается удалить проблемный раздел, попробуйте добавить дополнительные разрешения.

Правым щелчком мыши на службе в левой панели вызовите контекстное меню и выберите «Разрешения».

В разделе группы или имена пользователей найдите текущую учетную запись. Если не отображается, нажмите Добавить – Дополнительно – Найти. Выберите ее из результатов поиска.

Установите курсор на текущую учетную запись в разделе группы и имена пользователей, отметьте флажком поле полный доступ в разделе Разрешения и примените изменения.

После этого попробуйте снова удалить раздел и перезагрузите компьютер.

После перезагрузки запустите командную строку от имени администратора с помощью системного поиска.

Запустите следующую команду, которая позволит восстановить удаленный раздел из реестра:

sfc /scannow

Дождитесь завершения сканирования и перезапустите ПК. Проверьте, решена ли проблема.

Перезапуск MySQL

Если ошибка 1607 связана со MySQL, сначала ее остановим, затем удалим несколько файлов в каталоге установки.

Откройте Панель управления командой control из окна Win + R.

В правом верхнем углу экрана установите просмотр на крупные значки и перейдите в раздел Администрирование. В правой части окна выберите Службы.

Найдите MySQL и дважды кликните на нее, чтобы открыть свойства. Остановите ее нажатием на соответствующую кнопку.

Затем перейдите в проводнике в каталог установки MySQL, который находится на системном диске в папке Program Files (x86). Откройте его и перейдите в папку Data. Найдите два файла ib_logfile0 и ib_logfile1, кликните на них правой кнопкой мыши и удалите.

Вернитесь в окно служб и запустите MySQL. Проверьте, удалось ли устранить ошибку 1067.

I’ve run into a brick wall trying to install MySQL v5.5 on my machine.

My PC is Windows 7 x64, Enterprise edition.

MySQL installs fine, but when I run the «MySQL Instance Configuration Wizard», it pauses forever on the step «Start Service» (I can let it run for 30 minutes with no response). If I go into services, I see that the «MySQL» service hasn’t started, and if I try to start it, it says «Windows could not start MySQL Service on Local Computer. Error 1067: The process terminated unexpectedly.»

I’ve tried the following:

  • Turning off firewall.
  • Uninstalling all antivirus software.
  • Installing / reinstalling 32-bit version of MySQL.
  • Installing / reinstalling 64-bit version of MySQL.
  • Uninstalling, deleting the contents of «C:\program files\MySQL» and «C:\program files (x86)\MySQL», reinstalling.
  • Checking to see that there is no rogue services named MySQL???? (from a previous install).
  • Checking that port 3306 is not used by an alternate program.
  • Changing the default port that MySQL uses.
  • Checking for «my.ini» and «my.ini.cnf» in «C:\windows» (nothing there but that can cause a problem).
  • Running both MySQL installer, and configuration wizard, in «Adminstrator mode».
  • Turning off UAC.
  • Installing with defaults, not changing anything.
  • Rebooting my machine (about 6 reboots so far).
  • Opening up port 3306 in the firewall (both TCP and UDP, inbound and outbound).
  • Swearing at the klutz of a programmer who designed MySQL so you can’t even install it (as if that would help!)

My machine is working 100% in every other way. InfiniDB (a MySQL compatible database) installs 100%, as does Visual Studio 2010, Microsoft SQL Server, etc, etc.

Your advice on how to work around this?

p.s. Here is the screen it got stuck on for 15 minutes until I killed the process:

alt text

Update 2010-12-20

Tried MySQL v5.1, it didn’t work either. Its amazing — if you type «mysqld /?», or «mysqld -help», it doesn’t give you any help. And, if you try to restart the service manually, it doesn’t display any error messages. Could it be any more unhelpful?

Update 2010-12-21

Installed MySQL 6.0 alpha, and it worked. However, I’d rather not use an alpha release, given that the «stable» release is anything but :(

Update 2010-12-21

Found http://dev.mysql.com/doc/refman/5.1/en/windows-troubleshooting.html, dealing with troubleshooting under Windows.

Discovered that you can generate an error log if the service doesn’t start — see here: http://dev.mysql.com/doc/refman/5.1/en/error-log.html

Update 2010-12-21

Aha! A clue. To actually see the error, add «—console»:

mysqld --console

This returns:

101221 13:57:28 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use Windows interlocked functions
InnoDB: Compressed tables use zlib 1.2.3
101221 13:57:28  InnoDB: Initializing buffer pool, size = 203.0M
101221 13:57:28  InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file .\ib_logfile0 is of different size 0 56623104 bytes
InnoDB: than specified in the .cnf file 0 106954752 bytes!
101221 13:57:28 [ERROR] Plugin 'InnoDB' init function returned error.
101221 13:57:28 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
101221 13:57:28 [ERROR] Unknown/unsupported storage engine: INNODB
101221 13:57:28 [ERROR] Aborting
101221 13:57:28 [Note] mysqld: Shutdown complete

Update 2010-12-21

It now installs properly. See the answer below.

Понравилась статья? Поделить с друзьями:
  • Mysql ошибка 1045 при установке
  • Mysql логирование ошибок
  • Mysql код ошибки 2006
  • Mtasa com ошибка протокола 60
  • Mta ошибка сс23