MySQL [-1] error and Apache runs but can't reach localhost

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

MySQL [-1] error and Apache runs but can't reach localhost

Postby X-Bumble » 27. September 2009 01:59

HI there,

I hope someone can help me as I have spent all day on this and got back to square one.

I originally installed Xampp 1.7.2 and it worked fine. I found out some way down the line of getting this all working with Eclipse that Joomla cannot work with 1.7.2.

As such, I deleted the xampp folder on the C: drive which was 1.7.2 and installed 1.7.0.

However, after doing that the control panel shows me a green bar for Apache, yet if I try and reach localhost I get an 'Unable to connect' error page.
If I click the MySQL start on the control panels I get an immediate error message as follows:

Code: Select all
ERROR: MySql service not started [-1]


So in essence I have gone from having it all working this morning and working on Joomla files via Eclipse, to now not even being able to get apache and MySQL working nor interact with a browser.

I'm wondering if I should be deleting other files somewhere else or something?

If anyone can shed some light I would be truly grateful.
X-Bumble
 
Posts: 4
Joined: 27. September 2009 01:51

Re: MySQL [-1] error and Apache runs but can't reach localhost

Postby Izzy » 27. September 2009 03:24

X-Bumble wrote:...As such, I deleted the xampp folder on the C: drive which was 1.7.2 and installed 1.7.0.
You did this before uninstalling the Apache and MySQL NT Services perhaps - did you use the uninstall_xampp.bat as mentioned in the readme_en.txt file?.

So you may be left with both those old services interfering with your fresh installation.

Try this first:
Run the 2 bat files apache_uninstallservice.bat in the Apache folder and the mysql_uninstallservice.bat in the mysql folder after first making sure that both Svc boxes are not checked in the XCP (XAMPP Control Panel) and both Apache and MySQL are stopped (don't show a green running).

Now reboot your PC and try again to get things running.

If that fails then try this next:
Go to Start>Run...
Type sc delete apache2.2
Click OK

Next type sc delete mysql
Click OK

Now try again to get things running.

When there is a tic in the Svc box in XCP then it indicates that Apache and or MySQL are installed on your PC as a Windows NT Service and so have entries in the registry and if those entries are from a previous installation then they need to be removed so a fresh install can proceed.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: MySQL [-1] error and Apache runs but can't reach localhost

Postby X-Bumble » 27. September 2009 08:40

Hi there,

Many thanks for helping me, I really do appreciate it.

I have done as you have suggested.

The Svc tick boxes are now empty and bother services show as green and running (many thanks for the tip!)

However, localhost still comes back as unavailable which is odd.

If you have any further ideas, I'll bung you over a cyber-forum pint!
X-Bumble
 
Posts: 4
Joined: 27. September 2009 01:51

Re: MySQL [-1] error and Apache runs but can't reach localhost

Postby Izzy » 27. September 2009 08:47

Check your firewall and or anti-virus software is not blocking by temporarily disabling them.

Good luck.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: MySQL [-1] error and Apache runs but can't reach localhost

Postby X-Bumble » 27. September 2009 08:58

HI there,

Many thanks for the reply.

I have shut down AVG and Spyware doctor but I still cannot access the page?

Point of note, I can reach the Xampp page if I use 127.0.0.1 rather than localhost.

It was all going so well at one point :0(
X-Bumble
 
Posts: 4
Joined: 27. September 2009 01:51

Re: MySQL [-1] error and Apache runs but can't reach localhost

Postby Izzy » 27. September 2009 09:26

X-Bumble wrote:Point of note, I can reach the Xampp page if I use 127.0.0.1 rather than localhost.
Yes, in 1.7.2 this issue with IPv6 has been addressed but not in earlier versions so when you changed version back to 1.7.0 it reared it's ugly head.

Open C:\Windows\system32\drivers\etc\hosts file in your text editor (notepad for example).

Look for this line:
::1 localhost
delete it or comment it out like so:
# ::1 localhost

Save the file and try again to access http://localhost.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: MySQL [-1] error and Apache runs but can't reach localhost

Postby X-Bumble » 27. September 2009 09:49

Yep - worked first time.

Many thanks for you help - I really do appreciate it.
I would never have found that on my own!

Thanks again.

Mike
X-Bumble
 
Posts: 4
Joined: 27. September 2009 01:51

Re: MySQL [-1] error and Apache runs but can't reach localhost

Postby Izzy » 27. September 2009 10:55

Your welcome Mike and I am pleased you can now move forward.

Let's hope that Joomla move into top gear and get their scripts php 5.3 compatible.

Best of luck.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 120 guests