in reply to Re: Strawberry Perl & DBD::mysql
in thread Strawberry Perl & DBD::mysql

I badly need this patch and tried to run: mysql_config_win32.pl ...it has failed every time stating: 'C:\PROGRA~1\MySQL\MySQL' is not recognized as an internal or external command, operable program or batch file. Problem running C:\PROGRA~1\MySQL\MySQL Server 5.0\bin \mysqladmin.exe - aborting ... ...I went into the script and found that the variable: $mysqladmin was correctly getting the path in $mysqladmin @line 55, or thereabouts, of the script, however the next line: my $v = qx($mysqladmin version); results in no value in $v which then exits on the following "unless ($v) { etc, etc.... I attempted to run "mysqladmin version" at the command prompt which resulted in an error: "mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'ODBC'@'localhost' (using password: NO)' ...assuming this might be why $v gets no value, I spent hours trying to figure this out and did many things to my MySQL. I can get it to work issuing this command: mysqladmin -u root -p1588 version (1588 is just a dummy password value I put in...) ...first, I may be barking up the wrong tree here! ...second, if I am not, how do I feed the correct string to this portion of the script? Any help would be very much appreciated, it took me a long time to find this thread and answers to installing DBI and DBD:mysql on my Windows Vista machine with Perl 5.10 and the latest MySQL. I badly need wisdom and thank anyone who thinks they can explain this in advance! Best Pyrrhic

Replies are listed 'Best First'.
Re^3: Strawberry Perl & DBD::mysql
by syphilis (Archbishop) on Feb 17, 2009 at 04:56 UTC
    'C:\PROGRA~1\MySQL\MySQL' is not recognized as an internal or external command

    I would think that the main problem here is that mysqladmin.exe is in a folder whose name contains white space (ie the "MySQL Server 5.0" part of the path).

    The best solution is to not put *anything* in such places - then you won't have to deal with the various workarounds. One such workaround in this instance (untested) is to replace $v = qx($mysqladmin version); with $v = qx("$mysqladmin" version);
    I think that will work - otherwise you could try  $v = qx("\"$mysqladmin\"" version);


    Cheers,
    Rob
      Or use a short pathname (one without spaces)
      D:\>perl -MWin32 -e"print Win32::GetShortPathName(shift)" "C:\Program +Files\Mozilla Firefox" C:\PROGRA~1\MOZILL~1