Running XAMPP from USB stick

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

Running XAMPP from USB stick

Postby michelefaccini » 06. November 2012 10:04

Hi all, I'm hosting my own web site from home with a NAS. Because I'm planning to use my web site at work for demo purposes I successfully installed XAMPP on a USB stick avoiding so to use internet at work. My XAMPP installation runs like a charm at home but at work not . This is due to the fact that MYSQL service is already running on the PC. Even if I stop this service (we are still using Windows XP), and just after I start XAMPP from the Control Panel (v3.0.12), MYSQL is unfortunately started from my PC and not from my USB stick.Any suggestion to bypass the problem ? Please keep in mind I'm not an expert...I'm still learning...Thanks to who will answer....bye......
michelefaccini
 
Posts: 5
Joined: 06. November 2012 08:33
Operating System: Windows 7 64 bit Ultimate

Re: Running XAMPP from USB stick

Postby Nobbie » 06. November 2012 11:15

You may try run Xampp without Control Panel.

The Control Panel is not necessary for Xampp, it is a "nice to have GUI". Instead, you should try to start Apache und MySQL manually from the USB stick.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Running XAMPP from USB stick

Postby michelefaccini » 06. November 2012 11:40

Thanks a lot I will try....and let you know.....
michelefaccini
 
Posts: 5
Joined: 06. November 2012 08:33
Operating System: Windows 7 64 bit Ultimate

Re: Running XAMPP from USB stick

Postby Altrea » 06. November 2012 16:23

Hi michelefaccini,

michelefaccini wrote:My XAMPP installation runs like a charm at home but at work not . This is due to the fact that MYSQL service is already running on the PC. Even if I stop this service (we are still using Windows XP), and just after I start XAMPP from the Control Panel (v3.0.12), MYSQL is unfortunately started from my PC and not from my USB stick.

The new Control Panel v3.0.11 which comes with XAMPP 1.8.1 is configurable. In its settings you can specify the port and service name it is checking for.
If you want to start the USB MySQL without any conflict to the already existing MySQL Service all you have to do is change the service name in the control panel to a different one then your pc at work is using and be sure that your USB mysql is using a different port (that port have to be configured in both, mysqls my.ini configuration file and for observer purposes in the xampp control panel). After that change the control panel should be restarted once.

best wishes,
Altrea
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: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Running XAMPP from USB stick

Postby greenfairy » 07. November 2012 12:07

@Altrea hi!,
I'm french, my english sucks ...
you accept to give me an answer?
for practical reasons I need to install many xampp standalone.
I have regularly changing environment of my desktop pc to a usb key

I installed two (XAMPP 1.8.1), made ​​the following changes:
- Ports for appache and mysql in the control panel and in the files,
- I changed the name of apache and mysql services ...
but when I connect with my browser
localhost:port1 and localhost:port2 I perceive that phpmyadmin connects to the same database.
do you have a way to get my two facilities are truly standalone.
I found traces of 3306 in the files.
server_synchronize.php, replication_gui.lib.php,unicode_data.php, security.php, xamppsecurity.php
should replace all 3306?
thank you for your response. :D
green.
http://www.creativ-e-motion.fr/creation-site-internet
greenfairy
 
Posts: 6
Joined: 07. November 2012 10:25
Operating System: windows 7

Re: Running XAMPP from USB stick

Postby Altrea » 07. November 2012 16:19

Hi greenfairy,

If you want to access your database with phpmyadmin on a different port than default 3306, you need to change the phpmyadmin configuration file too:
  • open your \xampp\phpMyAdmin\config.inc.php file
  • Search for
    Code: Select all
    $cfg['Servers'][$i]['host'] = '127.0.0.1';
    and after that line add:
    Code: Select all
    $cfg['Servers'][$i]['host'] = 3307; // the port you used for mysql
  • save the file
  • clear your browser cache

You could use phpmyadmin to connect multiple mysql instances too. for example:
Code: Select all
<?php
/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 */
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */

/*
 * Servers configuration
 */
$i = 0;

/*
 * First server
 */
$i++;

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';

/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['host'] = 3306;
$cfg['Servers'][$i]['connect_type'] = 'tcp';

/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';

/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
$cfg['Servers'][$i]['tracking'] = 'pma_tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';
$cfg['Servers'][$i]['recent'] = 'pma_recent';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma_table_uiprefs';

/*
 * Second server
 */
$i++;

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';

/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['host'] = 3307;
$cfg['Servers'][$i]['connect_type'] = 'tcp';

/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';

/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
$cfg['Servers'][$i]['tracking'] = 'pma_tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';
$cfg['Servers'][$i]['recent'] = 'pma_recent';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma_table_uiprefs';

/*
 * End of servers configuration
 */

?>

(In this example i have changed the $cfg['Servers'][$i]['auth_type'] setting from config to cookie, because maybe/hopefully you have different root passwords for each server)

best wishes,
Altrea
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: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Running XAMPP from USB stick

Postby greenfairy » 07. November 2012 19:05

thanks for your answer but I have a error #2002
http://www.creativ-e-motion.fr/creation-site-internet
greenfairy
 
Posts: 6
Joined: 07. November 2012 10:25
Operating System: windows 7

Re: Running XAMPP from USB stick

Postby greenfairy » 09. November 2012 08:49

@ Altrea
hi i try to configure xampp 1.8.1 with your information but I can not do it when I connect to mysql server http://localhost:8080/phpmyadmin/ answer me an error # 2002 ... there is something that I must do it properly ... would it be possible to make a zip file with xampp 1.8.1 and the preconfigured to téléchragement on github for example?
http://www.creativ-e-motion.fr/creation-site-internet
greenfairy
 
Posts: 6
Joined: 07. November 2012 10:25
Operating System: windows 7

Re: Running XAMPP from USB stick

Postby greenfairy » 09. November 2012 15:48

@ Altrea thank you for your help, I finally found a solution through the install script as explained in the help. there is less possibility of error, and the config files are generated automatically.
phpMyAdmin / setup.
it helped me comprarer my two config.inc.php files and see that there is a syntax error

it is not.
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['host'] = 3306;

but it is.
$cfg['Servers'][$i]['host'] = '127.0.0.1'';
$cfg['Servers'][$i]['port'] = 3306;

I solved my problem thank you good day :)
http://www.creativ-e-motion.fr/creation-site-internet
greenfairy
 
Posts: 6
Joined: 07. November 2012 10:25
Operating System: windows 7

Re: Running XAMPP from USB stick

Postby michelefaccini » 10. November 2012 17:07

Thanks Nobbie....for your answer...it works ( in fact I launch Apache from the Control Panel and launch MySQL with the batch file 'mysql_start'. I will also try what Altrea pointed to...Thanks guys....
michelefaccini
 
Posts: 5
Joined: 06. November 2012 08:33
Operating System: Windows 7 64 bit Ultimate


Return to XAMPP for Windows

Who is online

Users browsing this forum: Lasmak and 97 guests