ERROR: MySql service not started [-1]

Problems with the Windows version of XAMPP, questions, comments, and anything related.

ERROR: MySql service not started [-1]

Postby mattquiros » 16. May 2011 06:52

Hey guys, I first installed XAMPP with the installer for Windows and uninstalled it using the .exe file in the C:\xampp folder (I forgot what that was called). Then some folders were left over so I deleted them manually, just by pressing Ctrl+A and Shift+Del. Then I downloaded the XAMPP zip file and followed the instructions for installing without the installer, and now that I've set up everything, Apache would run in xampp-control but not MySQL. Whenever I click on "Start" the message "ERROR: MySql service not started [-1]" always appears. What do I do?
mattquiros
 
Posts: 5
Joined: 16. May 2011 06:45

Re: ERROR: MySql service not started [-1]

Postby Sharley » 16. May 2011 07:05

There may be a MySQL Windows Service still installed from your last installation that you failed to Stop before deleting the XAMPP folder.

Check using the Windows Service Manager either from the XAMPP Control Panel or from the Administrators menu in Windows.

If you find one then simply disable it - reboot and try again.

You could also try running the mysql_uninstallservice.bat file from the mysql folder, then try and start MySQL again from the Control Panel but do not tick the Svc box.

Often just a reboot will fix things also.


Here are some instruction if you need them in the future:
viewtopic.php?p=179699#p179699
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: ERROR: MySql service not started [-1]

Postby mattquiros » 16. May 2011 07:22

Thanks! I already restarted my computer and was surprised to see MySQL running in the XAMPP Control Panel, and when I clicked stopped, I got an error message similar to the above and couldn't stop it. So when I checked the SCM, I stopped the "mysql" one manually. Looks like I'll be starting and stopping MySQL from there. Is that normal?
mattquiros
 
Posts: 5
Joined: 16. May 2011 06:45

Re: ERROR: MySql service not started [-1]

Postby Sharley » 16. May 2011 07:26

No, stop MySQL and remove the tick in the Svc check box in the Control Panel or run the bat file I mentioned above - this will remove the entry in the SCM and then you can use the Control Panel in future.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: ERROR: MySql service not started [-1]

Postby mattquiros » 16. May 2011 07:32

Hmm, I stopped mysql in the SCM and tried to run the mysql_uninstallservice.bat, but it said "Install/Remove of the Service Denied!" I also tried unchecking the box beside MySQL and clicking OK in the dialog box that appeared, but nothing seems to have happened.
mattquiros
 
Posts: 5
Joined: 16. May 2011 06:45

Re: ERROR: MySql service not started [-1]

Postby Sharley » 16. May 2011 07:41

OK we are not beaten yet :)

Stop MySQL before trying to run the bat file.

You can also follow these instructions to remove it safely from the registry.

Stop MySQL if you can and close the Control Panel.

Open a command prompt
Click start
Click on Run...
Type: cmd.exe

Type:
sc delete mysql
Click OK

Open the Control Panel and try and start MySQL again but it is best not to have any ticks in the Svc boxes unless you absolutely know you want any of your web server to start when Windows starts and this is not recommended.

You can reboot again just to make sure it has gone.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: ERROR: MySql service not started [-1]

Postby mattquiros » 16. May 2011 07:51

Oh god, I'm afraid this is the message that comes up after typing "sc delete mysql" and this message appears:

[SC] OpenService FAILED 5:

Access is denied.

:(

I did a little more Googling about the problem and I found this: http://drupal.org/node/224342#comment-3322550 Do you think it's going to help? Thanks so much.
mattquiros
 
Posts: 5
Joined: 16. May 2011 06:45

Re: ERROR: MySql service not started [-1]

Postby Sharley » 16. May 2011 07:54

Sounds like you are not logged into Windows as an Administrator.

Right click on the bat file and select to run as an administrator and if you want to run a web server then consider logging into Windows as an Administrator.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: ERROR: MySql service not started [-1]

Postby mattquiros » 16. May 2011 07:57

Yes, I don't think I'm running admin. I'm using a computer from the office. :) Anyway, that last tip worked! Thanks a lot Ms. Sharley. :D
mattquiros
 
Posts: 5
Joined: 16. May 2011 06:45


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 52 guests