Can't start MySQL after new installation.

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

Can't start MySQL after new installation.

Postby dwion » 29. July 2006 08:38

ATTENTION: This has an odd workaround solution. See page 4, second post for solution steps.

----------------------------------------------------------------------------------------------------

I had an old copy of xampp (installer version) and needed to get more recent. I thought I would try and run two versions of xampp by keeping my old one local and the new one on an external drive, but xampp didn't like that, so I exported all my databases and completely removed (as far as I know) both installations.

I am now installing xampp 1.5.3a in the local root (c:\). I used the 7-zip package as I DO NOT want to run xampp or any of it's components as a service. Documentation says you don't need to run the setup-xampp.bat file if the installation is in the root, but I did it anyway (it can't hurt).

I can now start and stop Apache fine using the control panel, but when I try and start MySQL, the button quickly "start"s and then immediately "stop"s on its own. I realize this might mean there's a daemon running already, but when I check the Task Manager, there's no mysqld-exe nor mysqld-nt.exe in the list. Also, when I click the Services button in the control panel, none of the service check boxes are checked.

Now here's the two odd parts, but probably the clues for you, Izzy:

First, when I click the MySQL button to start it up as described above, the button doesn't change (and no green status indicator appears for "Running") yet in the status box underneath the buttons is says that MySQL has started. I cannot apparently turn it off again. I've tried using the .bat files in the root xampp folder to start/stop MySQL manually, but that has no effect on things. In any case, when I try and open phpMyAdmin, is says the server is not responding so MySQL must not really be running even though the control panel says it is.

Second, and I don't know if this has anything to do with anything at all, but it's odd nevertheless...when I'm in the Settings area of the control panel, I notice that the path to the services.exe file (which I'm assuming/hoping I'm not needing anyway) is pointing to my user account in Documents and Settings; in other words at c:\Documents and Settings\user. Now, I have never installed xampp at that location, so I don't understand that. Also, I am logged in as administrator (always) so that shouldn't be the issue.

The only thing I can think of but don't know how to check is if there are some xampp files from the old, original installer version still sitting around in the PC's registry. I wanted to avoid such nonsense, but maybe I didn't. What would be the names of the files I would check for, and where exactly would I look?

Any other ideas are warmly and greatly appreciated.
Last edited by dwion on 05. August 2006 14:53, edited 6 times in total.
wion.com
-Web standards development
-Content Publishing
-Writing
dwion
 
Posts: 37
Joined: 29. July 2006 01:40
Location: Strasbourg, France

Postby Izzy » 29. July 2006 09:42

It sounds like it might be a config issue but not sure here so first try looking in:
mysql\bin\my.cnf and check your paths are correct. It sounds like it can't find something. Check your error logs for clues.

In your control Panel change the paths that are wrong.

Do an overall manual path check to make sure there is nothing amiss.

Never had this one myself but I would have to suspect paths if you don't have another instance of mySQL running.

Another thing you could do was install the service and see if that starts it (doubt it) as you can always uninstall the service after your test.

If all else fails do a complete clean uninstall then reinstall again. Check the zip files for integrity MD5. All these little things are worth checking when things go wrong. It helps with getting familiar with where everything is also. ;)

Not much but I hope it helps a tad. :)
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby dwion » 29. July 2006 10:16

Thanks, Izzy, I'll run through all the suggested checks again, but with respect to...

Izzy wrote:If all else fails do a complete clean uninstall then reinstall again.


Is there certain registry files I might look for in the PCs registry? I think I saw you mention this somewhere else, but not anyt actual file names/locations. I wouldn't know file names or where to look exactly. Any clues?

Also, isn't there an English language wiki somewhere for community documentation efforts? I've found one in German, but that seems pretty limiting.
dwion
 
Posts: 37
Joined: 29. July 2006 01:40
Location: Strasbourg, France

Postby Izzy » 29. July 2006 10:50

If I want to do a clean uninstall of any software on my PC, I search the registry using as many keywords I can think of including the name of the software, the name of the author or maker, known locations etc. etc.
Some authors seem to like leaving junk all over the registry when it should be removed when you click 'Uninstall' after all they put it there and they know it's location. (pet hate of mine actually).

Anyway I found these keys when I searched for xampp. Don't forget always backup your registry before making changes. If it was me I would delete all of them that relate to being installed by XAMPP.

People involved with the authoring of XAMPP may know of more locations than I found as I did not try authors names etc.
    HKEY_CLASSES_ROOT\Software\Mercury32
    HKEY_CURRENT_USER\Software\Mercury32
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu2\Programs\apachefriends
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\LEGACY_XAMPP
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Apache2
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application\MySQL
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\FileZilla Server
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\mysql
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\XAMPP
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet004\Enum\Root\LEGACY_XAMPP
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet004\Services\Apache2
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet004\Services\Eventlog\Application\MySQL
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet004\Services\FileZilla Server
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet004\Services\MySql
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet004\Services\XAMPP
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_XAMPP
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache2
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\MySQL
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FileZilla Server
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MySql
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\XAMPP
    HKEY_USERS\S-1-5-21-1123561945-2111687655-725345543-1004\Software\Mercury32
    HKEY_USERS\S-1-5-21-1123561945-2111687655-725345543-1004\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu2\Programs\apachefriends


The above is from XAMPP that is not uninstalled so you most likely will not find all of these.

Watch for word wrap above and your registry might be different but a search don't take too long. ;)

Cheers. :)
Last edited by Izzy on 29. July 2006 11:04, edited 1 time in total.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby dwion » 29. July 2006 10:56

Ah, thanks again. A regular search...common sense. ;)

I'll try a few things and report.
dwion
 
Posts: 37
Joined: 29. July 2006 01:40
Location: Strasbourg, France

Postby Wiedmann » 29. July 2006 11:07

I DO NOT want to run xampp or any of it's components as a service.
...
First, when I click the MySQL button to start it up as described above, the button doesn't change (and no green status indicator appears for "Running") yet in the status box underneath the buttons is says that MySQL has started.

a) close the control panel
b) open a command prompt (cmd.exe):
Code: Select all
sc delete mysql
sc delete apache2
sc delete "FileZilla Server"

c) start the control panel
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Izzy » 29. July 2006 11:20

Weidmann wrote:sc delete mysql
sc delete apache2
sc delete "FileZilla Server"

I noticed this fix some time back in a posting in these forums.
Mind telling us why the Control Panel needs these commands to do its job when it fails?
Is it a bug perhaps? It is not documented anywhere that I could find.

Microsoft explains the Service Controller Commands here:
sc delete

Deletes a service subkey from the registry. If the service is running or if another process has an open handle to the service, then the service is marked for deletion.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby dwion » 29. July 2006 13:22

I've deleted the install, again, and did a new one, this time using the normal zip instead of the 7-zip exe. Same behavior and appearances as described initially.

(By the way, what does MD5 mean, how/why is that different?)

I haven't tried cleaning out the registry yet because I haven't yet backed it up. However, I tried starting MySQL again using the msql_start.bat file and I noticed the following this time:

"MySQL is trying to start.
Please wait...
MySQL is starting with mysql\bin\my.cnf (console)
The system cannot find the path specified.
MySQL could not be started."


When I go to that path location, the file is indeed not there (fresh install, no modifications).

Also, the services.exe path in the Settings of the Control Panel still points to my Documents and Settings location as indicated before. When I try and change that path to c:\xampp\services.exe (I'm assuming that's the right location), it automatically reverts back to the former incorrect path. I seem to have no control over it.

Weidmann, I tried your nifty service kills, and for all three instances it said:

"The specified service does not exist as a installed service"

So, this is puzzling. Either there is a file missing in these dowloads (my.cnf), or there really is something in my registry thats screwing everything up. I don't know what else it could be.

I guess the registry is the next step. sigh
dwion
 
Posts: 37
Joined: 29. July 2006 01:40
Location: Strasbourg, France

Postby Wiedmann » 29. July 2006 13:32

(By the way, what does MD5 mean, how/why is that different?)

How do I check the md5 checksum?
http://www.apachefriends.org/en/faq-xam ... l#checksum

When I go to that path location, the file is indeed not there (fresh install, no modifications).

This file must be there. Maybe you only see a "my" file...

Weidmann, I tried your nifty service kills, and for all three instances it said:
"The specified service does not exist as a installed service"

Good.

Two question:
- "xampp_setup.bat" was working without problems?
- Your OS?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby dwion » 29. July 2006 15:25

Wiedmann wrote:
When I go to that path location, the file is indeed not there (fresh install, no modifications).

This file must be there. Maybe you only see a "my" file...


Ah, you're right, I guess the extension doesn't show up. That through me off. So where do I remap that path? I guess I look in the config file?

Wiedmann wrote:- "xampp_setup.bat" was working without problems?


On this latest install I didn't bother running it since my install is in the root (according to the docs it's not necessary to run it under those conditions), but I just did it, spurred by your question, and I now see an apparent problem. It returns...

"Sorry ... cannot find php cli!
Must abort these processes!"


(cli = Command Line Interface)

Wiedmann wrote:- Your OS?


Winblows XP SP2

Wiedmann wrote:How do I check the md5 checksum?
http://www.apachefriends.org/en/faq-xam ... l#checksum


Still not sure I fully understand this. So it's a way to ensure you're getting the real package (as opposed to a bogus) like when downloading from a mirror? Something like that?
Last edited by dwion on 29. July 2006 18:49, edited 1 time in total.
dwion
 
Posts: 37
Joined: 29. July 2006 01:40
Location: Strasbourg, France

Postby Wiedmann » 29. July 2006 15:55

"Sorry ... cannot find php cli!
Must abort these processes!"

Well, then you have a problem with your Windows.

We know about this problem, but not the exact solution:
Some (Tweak-) Tools change the startup path from a subshell. In this case all relative paths we are using in XAMPP are not working.

Normaly a subshell should start in the current working directory, e.g: "C:\xampp". On your system a subshell starts in "c:\Documents and Settings\user". That's wrong.

The only real solution is to correct this setting in Windows (with the tool you used to make this change).

So it's a way to ensure you're getting the real package (as opposed to a bogus) like when downloading from a mirror? Something like that?

Right. It's a test to verify that the file is not corrupted (download failure, modified by someone).
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby dwion » 29. July 2006 18:04

Wiedmann wrote:Normaly a subshell should start in the current working directory, e.g: "C:\xampp". On your system a subshell starts in "c:\Documents and Settings\user". That's wrong.


Yeah, as soon as I saw that path, I knew there was a problem.

The only real solution is to correct this setting in Windows (with the tool you used to make this change).


Let me think:

When I initially added the second xampp installation on the external drive, as indicated in my initial post, the problem was the other way around; I could get to the MySQL database (phpMyAdmin), but not to the XAMPP start page, though I think it was by cause of an unrelated issue than the current. I kept getting a very generic error about an index page not being found or that my xampp folder was read-only.

The index page was false, of course, but the read-only thing seemed wierd to me because I had not run into that before, so I checked the xampp folder at c:\xampp and sure enough the folder was set as "Read-only." As it turns out, that's just normal behavior of WinXP; you can't change the read-only status of folders, even though the folder Properties interface indicates it should be possible. There is a MS KB, 326549 read-only workaround, but it didn't work for me. I then tried this guy's approach, as well as this other MS KB, 307874 doc, but nothing fixed the problem of the generic error I was getting. In the end, I deleted both xampp installs (local and external) and began my solo quest for a single local install with a new, stable release.

Here's my weak theory:

The elimination of the read-only permissions on the xampp folder was a snipe hunt, because in fact that probably had nothing do do with my 403 error problem; I think it was just a dual XAMPP conflict or something else that I wasn't seeing. However, I think because I was screwing around with all that folder sharing permissions stuff, it must of done something to cause this latest problem with the subshell reading.

I offer this as my theory because before this mess happened just two days ago, I never had problems with using xampp. Those folder sharing mods must be the culprit of this latest Winblows problem. I deleted that folder, of course, but something must be hanging around. Anyway, sorry to bend your ear, but if it offers any clues for the next guy, then it worth it.

I'll try and backtrack with this stuff and see what I come up with. If I find success I'll report it. Thanks Izzy and Wiedmann for your great help. I learned a lot here.

@All: Should you ever come to such crossroads in your XAMPP use, you DO NOT need to change folder permissions on your WinXP folders as you may find indicated with any 403 errors, the problem is somewhere else in the configuration and/or conflict of things, you just have to find it.

EDIT: Here is one of the few things I can find on the net about php cli, but I can't read German so I don't kow if it's helpful or not.
dwion
 
Posts: 37
Joined: 29. July 2006 01:40
Location: Strasbourg, France

Postby Izzy » 29. July 2006 21:08

It seems we're shrouded in fog on this issue. :)

Just another thing to take a look at maybe here. Did you check to see if there was an Environment Variable that had been set for XAMPP that may be clogging up the works?

You may be able to set one or change one for it by following these steps:

User Variables for User Name
Any user can add, modify, or remove a user environment variable. These variables are established by Windows XP Setup, by some programs, and by users. The changes are written to the registry, and are usually effective immediately. However, after a change to user environment variables is made, any open software programs should be restarted to force them to read the new registry values. The common reason to add variables is to provide data that is required for variables that you want to use in scripts.

To view or change environment variables:
1. Right-click My Computer, and then click Properties.
2. Click the Advanced tab.
3. Click Environment variables bottom left.
4. Click one of the following options, for either a user or a system variable:
• Click New to add a new variable name and value.
• Click an existing variable, and then click Edit to change its name or value.
• Click an existing variable, and then click Delete to remove it.

You may want to check the ComSpec variable has a value of %SystemRoot%\system32\cmd.exe when you click on Edit. If not you can New it to create it or Edit it's value so it does.

You may want to check the Path variable by selecting Edit then copy and paste the contents into a text editor so you can see the whole line. You can then edit it and then copy/paste it back to the text box.

At least it may give you some more clues in this great detective mystery, at most it may resolve it.

Good luck dwion. :)
Last edited by Izzy on 29. July 2006 21:44, edited 5 times in total.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby Wiedmann » 29. July 2006 21:20

dwion wrote:EDIT: Here is one of the few things I can find on the net about php cli, but I can't read German so I don't kow if it's helpful or not.

For a test:
Open a command prompt (cmd.exe) and execute this command
Code: Select all
echo %ComSpec%

What is the output?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby dwion » 29. July 2006 21:42

Wiedmann wrote:For a test: Open a command prompt (cmd.exe) and execute this command
Code: Select all
echo %ComSpec%

What is the output?


It outputs exactly:

c:\WINDOWS\system32\cmd.exe

@Izzy: Thanks for that, but if there's a clue in those variables, I wouldn't know it. Doesn't appear to be much there to be honest.

EDIT: Sorry Izzy, the comspec variable looks just like the output above there when viewed in the variables normal display, but looks just like
Code: Select all
%SystemRoot%\system32\cmd.exe
when viewed in edit mode. So I guess it checks out fine?

I gave up on the permissions/file sharing investigation as presented in my lame theory. It was just more of the same snipe hunt, I'm pretty sure. Especially since I long since deleted the one xampp folder that I had made any sharing changes to anyway. Seems to me any such changes would have went with the scrapped folder.
Last edited by dwion on 29. July 2006 22:12, edited 1 time in total.
dwion
 
Posts: 37
Joined: 29. July 2006 01:40
Location: Strasbourg, France

Next

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 131 guests