So if you are reading this post then most likely you come across this MySQL error Cannot create windows service for MySQL while installing MySQL server on you PC.
Why the Problem occurred?
The MYSQL did not installed on your PC correctly. The remains of MYSQL files are still in your directory and it did not fully removed from you PC after uninstalling the program too, so due to this the configuration wizard of MYSQL cannot create a new MYSQL service so we need to remove that remaining files of MYSQL from our PC and our problem will be resolved. Don’t worry I’ll teach you how to solve this error step by step. Just follow me and this error will be no more.
STEP-1 :- First you need to uninstall the MYSQL server which you have install now. So for that go to Control Panel > Program and Features > and list of all the software’s that are installed on your PC will appear. Select MySQL server and click uninstall.
STEP-2 :- After uninstalling the program go to C drive > Program files > and then from the views section in the Menu Bar just just check the hidden items box so that you can see all the hidden files in the directory.
STEP-4 :- After check the hidden items box search for MySql folder in the Program Files. You will see a MySQL folder just delete the folder.
STEP-5 :- That’s it. Try Reinstalling the Program again now hopefully there will be no error and you program must be installed successfully.
THANKS FOR READING! 🙂
Video Solution to this error
You can check out some more Articles from here :-
If you are visiting this page, most likely you have seen this on your screen after trying to reinstall MySQL 5.X
This is the MySQL Error 0, which usually follows a windows notification that mysqld.exe has stopped working. After reading many forum posts, it appears that there is no definite answer as to how to solve the problem. However, I finally came across a method that worked for me, and hopefully it will work for you. The OS in this scenario is Vista 32-bit.
The Problem
The problem is MySQL did not properly uninstall. Remnants of MySQL still exist on your computer, and the configuration wizard can not create a new MySQL service because of this. An indication of this is the fact that while you were trying to reinstall MySQL, you may have been prompted to enter your «old password.» A brand new configuration doesn’t ask for this.
The Solution
Step 1)If MySQL is still Installed, run the MySQL Server Instance Config Wizard. (Should be found in your start menu under MySQL)
Step 2)Select «Remove Instance».
Step 3)Click Execute, and once complete, click finish.
Step 4)Open the Command Prompt
Step 5)Type in
sc delete mysql
into the command prompt. If it fails, that’s fine.
Step 6)Uninstall MySQL Server 5.X via the control panel.
Step 7)Open the C:\ directory.
Step 
Step 9)In you C:\ drive, you will now see a folder named ProgramData that was not visible before. Open it.
Step 10)If you see the MySQL Folder, Delete it!
Step 11)Check the C:\Program Files directory. If you see a MySQL Folder, Delete it!
At this point, I was able to run the MSI Installer again and install MySQL normally.
March 02, 2010
I recently ran into a problem installing MySQL on a machine who had undergone several generations of web stacks and butchered development environments. Deciding to do some spring cleaning, I got rid of WAMP, XAMPP, and all manners of a la carte databases and web server installs, and did a fresh IIS 5.1(lol)/MySQL setup. During this purifying, all went well save for installing MySQL via the Server Instance Config wizard. I received the message from the installer:
Cannot create Windows Service for MySQL. Error: 0
Thinking that it was probably some lingering MySQL service collision, I checked through services.msc and was able to turn up an old MySQL service set up by a now long gone XAMPP install. XAMPP provides scripts to deal with this, I believe, but either they didn’t completely work, or weren’t run before that particular xampp uninstallation was completed.
In any case, the service needed to be removed. To get the NT Service Controller to remove the old service, (assuming you have it removed and deleted from its physical location on the disk – that is, somewhere in C:Program Files(WAMP)|(XAMPP), and now there’s just a lingering service not hooked up to anything), you just open a command prompt, find the “Service Name” in the service property windows (when you double click a service in services.msc, most likely since we’re both talking about MySQL here, it will be using the service name “MySQL”, but double check to be sure.
Once you have that, in the command prompt perform:
sc delete MySQL
That will succeed, then just restart the MySQL Server Instance Config Wizard and once you get to the execution, it won’t fail you on the “Start the service” step!
This was at least the problem I had, hopefully it’s helpful if anyone else goes through this predicament!
Tags: mysql, windows
This entry was posted on September 5, 2012 at 9:50 pm and is filed under MySQL, Windows. You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
-
#1
When trying to install MySQL on Windows 7 (Home Premium) I get through most of the install procedure but always come up with the error stated in the title appended with Error 0.
Any suggestions would be appreciated.
-
#2
When trying to install MySQL on Windows 7 (Home Premium) I get through most of the install procedure but always come up with the error stated in the title appended with Error 0.
Any suggestions would be appreciated.
Error 0 is often ERROR_SUCESS ( == No error )
Perhaps the service is already existing, that’s why you get an error 0 (ok), but message says it can’t create it since it’s already exists…
Run «mmc services.msc» and check if the mysql service is in the list….
Last edited:
-
#3
There is a service mysql listed as being Start up Type Automatic but it’s blank under Status.
I have stopped and deleted the service before and it appears this is as far as it gets in the install. That is, the mysql service gets partially created, since it appears in the list again after the install, but but it never gets completed, and started.
-
#4
There is a service mysql listed as being Start up Type Automatic but it’s blank under Status.
I have stopped and deleted the service before and it appears this is as far as it gets in the install. That is, the mysql service gets partially created, since it appears in the list again after the install, but but it never gets completed, and started.
What happens if you try to start the service manually then?
-
#5
I can’t find a mysql_start script. I manually run mysql_installservice.bat and get the following.
Installing MySQL as an Service
The system cannot find the file specified.
Install/Remove of the Service Denied!
Try to start the MySQL deamon as service …
Press any key to continue . . .
System error 5 has occurred
Access is denied.
Looking at the installservice.bat file shows that there is no my.cfg or my.ini file.
-
#6
I can’t find a mysql_start script. I manually run mysql_installservice.bat and get the following.
Installing MySQL as an Service
The system cannot find the file specified.
Install/Remove of the Service Denied!
Try to start the MySQL deamon as service …
Press any key to continue . . .
System error 5 has occurred
Access is denied.
Looking at the installservice.bat file shows that there is no my.cfg or my.ini file.
Ahh..
If you’re running a script which needs admin privileges (and it DOES if it handles services etc), you must start the command prompt you’re using
As Administrator
(right click on Command Prompt, and select «Run as Administrator»
That might help.
-
#7
Yeh, that does make a difference, running the installservice now gives me a new error after starting the service. It fails to start with a System error 1067
-
#9
I will try to follow one or more of the fixes posted ,
Thanks, I will post later what happened.
Want to reply to this thread or ask your own question?
You’ll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.
Ask a Question
| Command prompt cannot is disabled, registry is disabled, task manager | 0 | |
| Cannot Create Any File | 0 | |
| SOLVED «cannot create a system repair disc- error (0x80070057)» | 1 | |
| Cannot Join HOMEGROUP, and I am ON the computer that created it | 0 | |
| Cannot create folders | 1 | |
| Cannot create system repair disc | 7 | |
| SOLVED Cannot Create A Restore Point | 5 | |
| Cannot create restore point i Win 7 RC | 10 |
Распознавание голоса и речи на C#
UnmanagedCoder 05.05.2025
Интеграция голосового управления в приложения на C# стала намного доступнее благодаря развитию специализированных библиотек и API. При этом многие разработчики до сих пор считают голосовое управление. . .
Реализация своих итераторов в C++
NullReferenced 05.05.2025
Итераторы в C++ — это абстракция, которая связывает весь экосистему Стандартной Библиотеки Шаблонов (STL) в единое целое, позволяя алгоритмам работать с разнородными структурами данных без знания их. . .
Разработка собственного фреймворка для тестирования в C#
UnmanagedCoder 04.05.2025
C# довольно богат готовыми решениями – NUnit, xUnit, MSTest уже давно стали своеобразными динозаврами индустрии. Однако, как и любой динозавр, они не всегда могут протиснуться в узкие коридоры. . .
Распределенная трассировка в Java с помощью OpenTelemetry
Javaican 04.05.2025
Микросервисная архитектура стала краеугольным камнем современной разработки, но вместе с ней пришла и головная боль, знакомая многим — отслеживание прохождения запросов через лабиринт взаимосвязанных. . .
Шаблоны обнаружения сервисов в Kubernetes
Mr. Docker 04.05.2025
Современные Kubernetes-инфраструктуры сталкиваются с серьёзными вызовами. Развертывание в нескольких регионах и облаках одновременно, необходимость обеспечения низкой задержки для глобально. . .
Создаем SPA на C# и Blazor
stackOverflow 04.05.2025
Мир веб-разработки за последние десять лет претерпел коллосальные изменения. Переход от традиционных многостраничных сайтов к одностраничным приложениям (Single Page Applications, SPA) — это. . .
Реализация шаблонов проектирования GoF на C++
NullReferenced 04.05.2025
«Банда четырёх» (Gang of Four или GoF) — Эрих Гамма, Ричард Хелм, Ральф Джонсон и Джон Влиссидес — в 1994 году сформировали канон шаблонов, который выдержал проверку временем. И хотя C++ претерпел. . .
C# и сети: Сокеты, gRPC и SignalR
UnmanagedCoder 04.05.2025
Сетевые технологии не стоят на месте, а вместе с ними эволюционируют и инструменты разработки. В . NET появилось множество решений — от низкоуровневых сокетов, позволяющих управлять каждым байтом. . .
Создание микросервисов с Domain-Driven Design
ArchitectMsa 04.05.2025
Архитектура микросервисов за последние годы превратилась в мощный архитектурный подход, который позволяет разрабатывать гибкие, масштабируемые и устойчивые системы. А если добавить сюда ещё и. . .
Многопоточность в C++: Современные техники C++26
bytestream 04.05.2025
C++ долго жил по принципу «один поток — одна задача» — как старательный солдатик, выполняющий команды одну за другой. В то время, когда процессоры уже обзавелись несколькими ядрами, этот подход стал. . .
