XAMPP Portable is using wrong MySQL

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

XAMPP Portable is using wrong MySQL

Postby Phoenix IV » 15. September 2020 17:46

Hey there,

Let me explain my setup first:
I installed xampp to work with.
I downloaded xampp portable to create a portable version of a website for a friend to use.

Problem:
I started the portable version (clean install / extract), checked phpMyAdmin and saw my databases from the installed version.

Intended behaviour:
phpMyAdmin should not show my databases / use the "portable" / clean database.

Can someone help?
This seems to me like a bug in the portable version!

Edit: I care because I want to transfer one of the "installed" databases to the "portable" database.
Phoenix IV
 
Posts: 6
Joined: 15. December 2012 15:12
Operating System: Windows

Re: XAMPP Portable is using wrong MySQL

Postby Altrea » 15. September 2020 17:57

phpmyadmin connects to the dtabase given in it's configuration.
So if your priveous database management system is still running on the default settings, phpmyadmin will surely connect to the old one.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 10342
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: XAMPP Portable is using wrong MySQL

Postby Phoenix IV » 15. September 2020 18:09

Hm, I stopped MySQL in my installed version and started it in the portable version. Still, I receive the databases from the installed version.
Phoenix IV
 
Posts: 6
Joined: 15. December 2012 15:12
Operating System: Windows

Re: XAMPP Portable is using wrong MySQL

Postby Altrea » 15. September 2020 18:29

Did you register a windows service for your old MySQL installation?
You can change the expected service name of the XAMPP MariaDB component in the control panel configs menu.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 10342
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: XAMPP Portable is using wrong MySQL

Postby Phoenix IV » 15. September 2020 18:48

Altrea wrote:Did you register a windows service for your old MySQL installation?


I went in there blind, using the default XAMPP installation. I did not manually register any services, nor did I install additional tools / databases.

Altrea wrote:You can change the expected service name of the XAMPP MariaDB component in the control panel configs menu.


Found that. It says "mysql 3306" in both (installed and portable) programs.
Xampp control panel -> Config -> Service and Port Settings
Is this what you mean?

I expect phpMyAdmin, being nothing but PHP, just connecting to whatever SQL server is running on localhost. And it seems that starting "MySQL" from the portable version is somehow using the files in C:\xampp, my installed version.
Phoenix IV
 
Posts: 6
Joined: 15. December 2012 15:12
Operating System: Windows

Re: XAMPP Portable is using wrong MySQL

Postby Altrea » 15. September 2020 19:04

XAMPP use the default Serice name for all MySQL and MariaDB installations which is "mysql".
So if your already have a service name mysql registered, the control panel finds this default service name and expects it is their own installation.
To prevent this simply change the service name.

Another thing to consider if you are using the portable version, are the paths all correct?
You can set the paths by double clicking the setup_xampp.bat in users context.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 10342
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: XAMPP Portable is using wrong MySQL

Postby Phoenix IV » 15. September 2020 19:21

Running setup_xampp.bat did the trick. XAMPP Portable is now using it's own installation.

I am not happy with this, though. I see no reason why using XAMPP, which comes as a package, would not start it's own services. Especially for the portable version. (You may see this as a bug report).

I checked UwAmp (a portable server) in the meantime, which picked it's own MySQL database right away. I am now to decide which program I want to use.

Thanks!
Phoenix IV
 
Posts: 6
Joined: 15. December 2012 15:12
Operating System: Windows

Re: XAMPP Portable is using wrong MySQL

Postby Nobbie » 15. September 2020 19:35

If i were you, i would use UwAmp. That looks very handy for a USB stick installation. So why not using it?
Nobbie
 
Posts: 11676
Joined: 09. March 2008 13:04

Re: XAMPP Portable is using wrong MySQL

Postby Altrea » 15. September 2020 19:39

Use whatever bundle makes you most efficient.

Windows services are especially for portable versions not the way to go. That's why it is deactivated to register a service from the control panel itself. The non portable version does have red crosses / green ticks to register and unregister a service for each module.


Xampp gives you the possibility to use them, but the orientation of xampp is to be functional with as minimum changes to your system as possible. So if you are using the zip version and don't register any windows services the only thing to do to get rid of it completely is stopping its components and delete the xampp folder.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 10342
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: XAMPP Portable is using wrong MySQL

Postby Phoenix IV » 15. September 2020 20:11

I don't quite get what you mean, Altrea. I did not touch the services. All I was asking is XAMPP portable to be... portable. Using it's own SQL database.

Running setup_xampp.bat did the trick, but as I get it this breaks the portability?

If services have been registered this might have happened during the XAMPP default installation. But I did not do anything there on purpose.
Phoenix IV
 
Posts: 6
Joined: 15. December 2012 15:12
Operating System: Windows


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 85 guests