Changing Default Directories

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

Changing Default Directories

Postby Brrr in Alaska » 02. June 2016 01:47

I already had MySQL installed before installing Xampp. So I did not use the install MySQL option during the xampp install. Not surprisingly, the Xampp control panel does not show MySQL to be running, nor can I even start it. As far as xampp is concerned, MySQL isn't even installed. How can I tell Xampp where MySQL is installed so it can be manipulated in the control panel w/o having to uninstall the existing copy of MySQL.
xampp installed path is" c:\apps\xampp
MySQL installed path is: c:\apps\mysql

tnx
Brrr in Alaska
 
Posts: 2
Joined: 02. June 2016 01:35
XAMPP version: 5.6.21
Operating System: Win 7

Re: Changing Default Directories

Postby gsmith » 02. June 2016 07:56

It knows where your mysql is, it knew where mine was. From the xampp-control.log

10:29:38 PM [mysql] MySQL Service detected with wrong path
10:29:38 PM [mysql] Found Path: C:\mysql\bin\mysqld MySQL
10:29:38 PM [mysql] Expected Path: c:\xampp\mysql\bin\mysqld.exe --defaults-file=c:\xampp\mysql\bin\my.ini mysql

Looking at the source with my very limited pascal knowledge it queries the services API in Windows (line 67) and compares the path returned to what it should be in xampp (line 74). If the compare fails, it errors. It will only install the mysql service if mysql exists in the xampp folder (line 173) also. Source file

It is a proprietary thing and will not work for anything other than what it was made for, Xampp. It's understandable.

You could uninstall your mysql service, move your mysql to \xampp\mysql, reinstall service.
It should work then but I make no promises.
gsmith
 
Posts: 194
Joined: 29. November 2013 18:04
Location: San Diego
XAMPP version: 0.0.0
Operating System: Win XP to 2012R2/VS 6,9,11,14

Re: Changing Default Directories

Postby Brrr in Alaska » 02. June 2016 13:27

I actually wanted to avoid uninstalling MySQL. In the future, I may encounter a scenario where I have to install Apache, MySQL and or PHP as separate instances rather than a well wrapped package such as xampp and I'd rather learn how to do it now.

I guess at this point since there doesn't seem to be a specific ini file that I can just edit with the correct path, I'll have to sail along as is and hope that PHP when being called from a web page can communicate with MySQL without any issues.

I probably would have done the whole package install originally, but according to the xammp website, they had changed to MariaDB or something like that and dumped MySQL. Which is why I preinstalled MySQL in the first place. To my surprise, MySQL was included in the latest version, so I'm a bit confused on whats what as far as that goes.
Brrr in Alaska
 
Posts: 2
Joined: 02. June 2016 01:35
XAMPP version: 5.6.21
Operating System: Win 7

Re: Changing Default Directories

Postby Nobbie » 02. June 2016 18:19

Brrr in Alaska wrote:and I'd rather learn how to do it now.


Give it a try and you will see, that its by far easier than you might think. There is not much to do and PHP ususally is delivered with a readme.txt, which contains the proper statements for the Apache configuration. For MySQL you do not need to do anything. Its so easy, you will smile after successfull installation.
Nobbie
 
Posts: 8761
Joined: 09. March 2008 13:04

Re: Changing Default Directories

Postby gsmith » 02. June 2016 18:56

gsmith
 
Posts: 194
Joined: 29. November 2013 18:04
Location: San Diego
XAMPP version: 0.0.0
Operating System: Win XP to 2012R2/VS 6,9,11,14


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 27 guests