RESOLVED: Portable phpmyadmin will not work with mysql

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

RESOLVED: Portable phpmyadmin will not work with mysql

Postby 1andyw » 13. August 2010 11:55

XAMPP phpmyadmin cannot connect to mysql. Returns message that the user 'root' and password 'no' not recognized by mysql.
I am using a development pc that has apache and mysql already running.
I am attempting to us XAMPP on a usb stick to develop portable apps.
I disabled my local mysql but the XAMPP phpmyadmin on the usb stick continues to try to access the mysql on my pc.
I installed XAMPP with the 'use no drive letter' option.
What steps can I take to make portable apps play nice?
I am using winXPSP2HomeEdition with firefox

Thanks,

Andy
Last edited by 1andyw on 18. August 2010 15:16, edited 1 time in total.
1andyw
 
Posts: 6
Joined: 13. August 2010 11:45

Re: Portable phpmyadmin will not work with mysql

Postby JonB » 13. August 2010 20:34

I disabled my local mysql but the XAMPP phpmyadmin on the usb stick continues to try to access the mysql on my pc.


How did you do that?,

and what is in the config,inc.php file on the USB stick?

I have found it extremely hard to have more than one MySQL instance without un-installing one first. :?
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Portable phpmyadmin will not work with mysql

Postby 1andyw » 14. August 2010 01:24

JonB,

I use
Task Manager
to disable mysql. The config.inc.php is:
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']            = 'config';
$cfg['Servers'][$i]['user']                 = 'root';
$cfg['Servers'][$i]['password']             = '';
$cfg['Servers'][$i]['AllowNoPassword']      = true;

/* Server parameters */
$cfg['Servers'][$i]['host']             = 'localhost';
$cfg['Servers'][$i]['connect_type']     = 'tcp';
$cfg['Servers'][$i]['compress']         = false;

/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysqli';

/* 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';

/*
 * End of servers configuration
 */

/*
 * Directories for saving/loading files from server
 */
$cfg['UploadDir']   = '';
$cfg['SaveDir']     = '';

$cfg['AllowAnywhereRecoding']       = true;
$cfg['DefaultCharset']              = 'utf-8';
$cfg['DefaultLang']                 = 'en-utf-8';
$cfg['DefaultConnectionCollation']  = 'utf8_general_ci';

$cfg['MySQLManualBase'] = 'http://dev.mysql.com/doc/refman/5.1/en';
$cfg['MySQLManualType'] = 'searchable';

?>


I load this stick into a laptop with no php or mysql and XAMPP works correctly including the phpmyadmin.

I appreciate your help.

Andy
1andyw
 
Posts: 6
Joined: 13. August 2010 11:45

Re: Portable phpmyadmin will not work with mysql

Postby JonB » 14. August 2010 01:43

I don't think that will do it. You will probably have to have a service with a different name. There's a topic here where we solved this type of issue for Apache,

Service names are associated with executables found in a specific location.

The XAMPP instance calls itself 'MySQL' as I suspect does your 'stanalone installed' version. On Wamp they solved this by calling the service 'wampmysqld' and Apache - 'wampapache'.

I'm not familiar enough with the intracacies of the XAMPP installer to know how to tell you how to fix this, but I think BigWetDog might know.

For right now, Open the Service manager, see if there is a service called MySQL (I am 99.95% sure there will be) then right-click and get its Properties - that will include the 'path to executable' and that (~TaDa~) is likely the culprit. Indeed if it points to a location on the local system drive "it IS the problem".

I don't want to recommend changing anything, because I don't know what might break.

:shock:
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Portable phpmyadmin will not work with mysql

Postby 1andyw » 14. August 2010 14:04

You are correct. Having stopped mysql then opened the instance on the usb stick, the path to MySql remains the same:
Code: Select all
"C:\Program Files\MySQL\MySQL Server 4.1\bin\mysqld-nt"


Thank you for your attention.

BigWetDog does not show in the members list. Is it possible to invite him into this conversation?

Andy
1andyw
 
Posts: 6
Joined: 13. August 2010 11:45

Re: Portable phpmyadmin will not work with mysql

Postby JonB » 14. August 2010 16:01

Something must have gone wrong with your search:

memberlist.php?mode=viewprofile&u=45006

He and I communicate so I sent him a message - told him I have the bug pinned down, but don't have any bug spray for it. :mrgreen:
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Portable phpmyadmin will not work with mysql

Postby 1andyw » 14. August 2010 16:44

Thanks, JonB
1andyw
 
Posts: 6
Joined: 13. August 2010 11:45

Re: Portable phpmyadmin will not work with mysql

Postby BigWetDog » 18. August 2010 14:48

Hey, sorry, I've been off the grid for the last week or so. Hope I can still be of help.

First off, when you "installed" you used setup_xampp.bat correct? and you answered yes to "Should I make a portable XAMPP without drive letters?" correct?

Second, the value you indicated:
"C:\Program Files\MySQL\MySQL Server 4.1\bin\mysqld-nt"

comes from phpinfo() as the value of the Apache Environment variable MYSQL_HOME correct?
User avatar
BigWetDog
 
Posts: 148
Joined: 25. February 2010 15:54

Resolved: Portable phpmyadmin will not work with mysql

Postby 1andyw » 18. August 2010 15:13

BigWetDog,

Thank you for your reply. I have resolved the issue by using the 'Services' Admin Tool to stop the local MySQL server before inserting the USB stick into the pc. Having done that, the XAMPP program will run as designed. Great program!

Andy
1andyw
 
Posts: 6
Joined: 13. August 2010 11:45

Re: RESOLVED: Portable phpmyadmin will not work with mysql

Postby BigWetDog » 18. August 2010 15:30

Glad you got it working.
I just want to post this observation to capture it somewhere:

It would seem unlikely that the actual activation of the USB device would affect the configuration.
I suspect instead that as long as you were to disable the mysql service in the windows Services MMC Snap-in at any time prior to launching the xampp-control.exe you would not experience the misconfiguration.
Reviewing the source of the older xampp.c there is routine that refreshes the status of each of the services which is called when it's executed or when you click refresh. So what happened in your case is that it saw the running instance of mysqld and updated the environment variable, probably in \apache\conf\extra\httpd-xampp.conf. You may also have been able to resolve you problem by disabling mysqld in the Services Snap-in, start your myslqd USB instance, and click refresh on the xampp-control.

This is just me thinking out loud. And I'll update this entry if/when I learn more/otherwise.

Before you solved this, did you notice wether the "SVC" check box on xampp-control was checked?
Last edited by BigWetDog on 18. August 2010 17:12, edited 1 time in total.
User avatar
BigWetDog
 
Posts: 148
Joined: 25. February 2010 15:54

Re: RESOLVED: Portable phpmyadmin will not work with mysql

Postby 1andyw » 18. August 2010 16:58

Sorry, I don't recall if it appeared checked upon opening xampp-control. It does not now appear 'checked' when I install the usb and execute xampp-control.
I had used mysql-stop.bat then mysql-start.bat with bad results; phpmyadmin still opened with the error: mysql does not accept your password, etc. This occured while xampp-control indicated the green 'mysql running'.
I resolved only after executing the Admin Tool, 'Services'.
1andyw
 
Posts: 6
Joined: 13. August 2010 11:45


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 44 guests