Installing mysql as a service from a drive other than C:

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

Installing mysql as a service from a drive other than C:

Postby SkyDiver » 25. March 2009 03:03

Version: xampplite 1.7.0.

I've been really suffering from this one for quite a while: Basically I unzipped xampplite to D:\ and installed mysql as a service via xampp-control.exe.
Running with start/stop wasn't a problem, but once I installed it as a service it went all buggy, issuing "System error 1067 has occurred" over and over again...

xampplite is [supposed to be] designed to work from ANY drive, provided that it's installed directly under the root of the drive.
Well, after A LOT of trial and error, I found out that xampplite/mysql/bin/my.cnf contains several lines similar to the following:
basedir="/xampplite/mysql"

By changing all
"/xampplite/mysql"
occurrences to an absolute path such as this:
"d:/xampplite/mysql"
I finally got it to work!

So in case you're having similar issues with error 1067 - that's one step in solving the horrid error no. 1067.

NOTE: Investigating a bit deeper I found out that if I have a copy of xampplite under my C:\ root,
then everything will run just fine **from my d:\xampplite installation** even if I don't add the drive letter to "d:/xampplite/mysql", rather leave it like this: "/xampplite/mysql".
Going the extra mile, I then renamed C:\xampplite to something else, and again - everything broke down and I got error 1067 once again.

My conclusion is that when mysql works with non-absolute paths, it implicitly assumes that the active drive is C: and not the current one.

This took me DAYS to realize, so I hope it'll save the time for anyone reading this post.
Also - I hope the developers will see this post and take it under consideration in future versions.

(*) Actually, I'd like to mention another error that drove me crazy when I installed mysql as a service. This was related to the fact that when running mysql for the first time, a .ini file is created with a line that tried to execute "mysqld-shareware.exe".
This file doesn't exist and so the line needs to be replaced to execute "mysqld.exe" instead (I can't remember the exact details on how to fix).


-- SkyDiver
SkyDiver
 
Posts: 4
Joined: 25. March 2009 02:27

Re: Installing mysql as a service from a drive other than C:

Postby Izzy » 25. March 2009 03:12

When you installed xampplite did you run the setup_xampp.bat file as per the readme_en.txt file?
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: Installing mysql as a service from a drive other than C:

Postby SkyDiver » 25. March 2009 09:49

No I didn't - I understood that running xampp_setup.bat will hardcode a drive letter and will hamper the portability of the installation.
Since I want to keep xampp generic so I'll be able to also run it from a disk-on-key, I elected not to run xampp_setup.bat.
SkyDiver
 
Posts: 4
Joined: 25. March 2009 02:27

Re: Installing mysql as a service from a drive other than C:

Postby Izzy » 25. March 2009 10:33

SkyDiver wrote:No I didn't - I understood that running xampp_setup.bat will hardcode a drive letter and will hamper the portability of the installation.
That's correct.

SkyDiver wrote:Since I want to keep xampp generic so I'll be able to also run it from a disk-on-key, I elected not to run xampp_setup.bat.
No mention of this portability requirement in your first post - adding drive letters to the paths mentioned in your first post defeats the objective of portability anyway.

It is always helpful to tell the full story when posting on these forums including the Windows version, which was also omitted.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: Installing mysql as a service from a drive other than C:

Postby SkyDiver » 25. March 2009 21:13

Izzy wrote:No mention of this portability requirement in your first post

XAMPP is stated as being able to work this way and it's not.
My portability requirement is irrelevant to that - especially since it won't work from any permanent drive other than C:

Izzy wrote:adding drive letters to the paths mentioned in your first post defeats the objective of portability anyway.

Drive letter added due to lack of other alternative..

Izzy wrote:It is always helpful to tell the full story when posting on these forums including the Windows version, which was also omitted.

I posted in the "XAMPP for Windows" forum and I'm talking about C: and D: drives.
What seems to be omitted?

I had a problem that took me days to solve so I decided to post it here to help others.
Instead of receiving some kind of gratitude from someone who found this helpful - I'm getting replies with offensive attitude from you.

What's going on?!
The product doesn't work as been states and expected.
Please stop attacking ME!
SkyDiver
 
Posts: 4
Joined: 25. March 2009 02:27

Re: Installing mysql as a service from a drive other than C:

Postby Izzy » 26. March 2009 02:27

I can understand your frustration but had you come here in the first place and provided your Windows version, XAMPP version (both are important details) and the details of your issue then you could perhaps have been helped and been able to proceed much quicker.

Your post was providing unhelpful, incorrect and misleading information and so it was pointed out, if you take that as an attack then there is nothing I can do about your perceptiveness.


I've been really suffering from this one for quite a while: Basically I unzipped xampplite to D:\ and installed mysql as a service via xampp-control.exe.
Running with start/stop wasn't a problem, but once I installed it as a service it went all buggy, issuing "System error 1067 has occurred" over and over again...
First to install XAMPP to any root of any drive requires that setup_xampp.bat file be run to set the paths correctly...

...to install MySQL as a service the full path is required or Windows will not know where to look to be able to start the service - so installing xampp correctly in the first place would have saved you lots of time and frustration.

xampplite is [supposed to be] designed to work from ANY drive, provided that it's installed directly under the root of the drive...
...and so it will if installed as per the installation instructions in the readme_en.txt file.

Well, after A LOT of trial and error, I found out that xampplite/mysql/bin/my.cnf contains several lines similar to the following:
basedir="/xampplite/mysql"

By changing all
"/xampplite/mysql"
occurrences to an absolute path such as this:
"d:/xampplite/mysql"
I finally got it to work!

So in case you're having similar issues with error 1067 - that's one step in solving the horrid error no. 1067.
First to install XAMPP to any root of any drive requires that setup_xampp.bat file be run to set the paths correctly even in the my.cnf file...

...to install MySQL as a service the full path is required or Windows will not know where to look to be able to start the service - so installing xampp correctly in the first place would have saved you lots of time and frustration.


To install to any portable drive root folder then the setup_xampp.bat file must not be run and hence starting MySQL as a service is not possible, as stated above, it is a Windows OS limitation not an XAMPP limitation.


You can't run 2 instances of XAMPP at once on the same PC especially when one is installed as a service...
NOTE: Investigating a bit deeper I found out that if I have a copy of xampplite under my C:\ root,
then everything will run just fine **from my d:\xampplite installation** even if I don't add the drive letter to "d:/xampplite/mysql", rather leave it like this: "/xampplite/mysql".
Going the extra mile, I then renamed C:\xampplite to something else, and again - everything broke down and I got error 1067 once again.

My conclusion is that when mysql works with non-absolute paths, it implicitly assumes that the active drive is C: and not the current one.
...there is a registry entry created by Windows so it knows where to find the app to start as a service when it boots - this is the fact in your first post that you failed to realize and so blamed XAMPP for only recognizing the C:\ drive.

If you installed another instance of XAMPP to another drive root location, C:\ in your case, then ran setup_xampp.bat file and proceeded to install MySQL as a service then the Windows registry would have stored that information.
Then if you try and run your other instance of MySQL from the other drive D:\ in your case then a conflict is created.

You would have to uninstall the services of one instance then install the services on the other instance to eliminate the conflict.

This took me DAYS to realize, so I hope it'll save the time for anyone reading this post.
Also - I hope the developers will see this post and take it under consideration in future versions.
Installed correctly in the first place it would have saved you much wasted time, the developers know that XAMPP is designed to work correctly "out of the box" if a few simple installation instructions are followed and when these instructions are not followed then that is when a user will encounter difficulties and then try all sorts of needless hacks to extricate themselves from the issues that arise, as in your case.


IMHO, your issue has been a misunderstanding of how XAMPP works in conjunction with the Windows Service Controller and failing to install correctly...
...this from readme file.
readme-en.txt file wrote:[NOTE: Unpack the package to your USB stick or a partition of your choice.
There it must be on the highest level like E:\ or W:\. It will
build E:\XAMPPlite or W:\XAMPPlite or something like this.
Please do not use the "setup_XAMPPlite.bat" for an USB stick installation!]

Step 1: Unpack the package into a directory of your choice. Please start the
"setup_XAMPPlite.bat" and begin the installation.
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 70 guests