Errm, you are using the wrong paths.
If perl.exe is located in G:\xampp\perl\bin and the mysql script in G:\xampp\mysql\scripts, you need:
> G:\xampp\perl\bin\perl G:\xampp\mysql\scripts\mysqldumpslow.pl -s c -t 10.
Of course, that's a very roundabout way of doing things, so instead, add perl to your PATH, and cd
into the correct directory and then run it:
> set PATH=G:\xampp\perl\bin\;%PATH% // Note: This can be added in the
// System Control Panel.
> cd /d G:\xampp\mysql\scripts
> perl mysqldumpslow.pl -s c -t 10
Or even better, add perl to your known filetypes.
- Go to Explorer -> Tools -> Folder
Options -> File Types.
- Click 'New', type
pl
for the
extension field. Click Ok.
- Find PL in your list, click Advanced. Under Actions, click 'New'.
For Action type open
, for 'Application used to perform action' type:
G:\xampp\perl\bin\perl.exe -w "%1" %*
Click Ok.
Now you can just run the script as:
> mysqldumpslow.pl -s c -t 10
As you would in Linux.
Quick note: Adding .pl files as known file types is roughly equivalent to Unix people adding
#!/usr/bin/perl -w
to the start of every perl script. In Windows you only need to add it once.
Second note: The -w
turns on Warnings in the perl interpreter. You can leave out the -w
if you wish.