Where do I find the MysqlDumpSlow command?

mysql, mysqldumpslow

Solution

edit : oops, I read the manual wrong, and gave wrong information :-( sorry :-( let's give it another try...

I've just installed MySQL on windows, to try using `mysqldumpslow`, and I don't have `mysqldumpslow` installed either :-( So, you are not alone, and it doesn't seem to be a problem with your install (I've tried 5.1.x, but as you highlighted, it should be the same for 5.0.x)

Looking at the "`mysqldumpslow`" I have under Linux, it appears it is a Perl script ; and Perl is not often installed on a Windows machine. Maybe that would be a hint to a solution...

Well, after a bit more testing, when installing MySQL, it seems you have to select "Developpers Components > Scripts, examples", which is not installed by default (at least on windows) -- no need to reinstall everything : you can "modify" the installation, to add this option.

Then, you will have a "script" directory next to the "bin" one. For instance, on your install, it should be something like "c:\Program Files\MySQL\MySQL Server 5.0\scripts".

In this directory, there are some scripts ; one of them is mysqldumpslow.pl ; which is what you are looking for ;-)

Now, you "just" have to get Perl installed and running on your machine (sorry, I've never installed Perl on windows ; but you can find some informations here)

Hope this helps better than what I posted before !

Problem

Hi I'm logging slow queries because we're having some performance issues and I have read about `mysqldumpslow` and thought that would be a good way to sort through the queries. At the command prompt, I type `mysqldumpslow` and I get this: 'mysqldumpslow' is not recognized as an internal or external command, operable program or batch file. I'm using MySQL version 5.0.79 on Windows Vista. Note: `c:\Program Files\MySQL\MySQL Server 5.0\bin` is my path and I have searched the drive for 'mysqldumpslow' and can not find it. What am I doing wrong? Note: MySql 5.0.x does support the `mysqldumpslow` command follow this link to manual

Original source