mysqldumpslow

mysqldumpslow

am 14.04.2006 21:01:59 von Joelle Tegwen

So, I'm logging slow queries because we're having some performance
issues and I read about mysqldumpslow and thought that would be a good
way to sort through the queries.

so I log in to my production machine and open a command prompt and type
mysqldumpslow and I get this:
'mysqldumpslow' is not recognized as an internal or external command,
operable program or batch file.

I couldn't find anything special on the web that I was supposed to do to
make this work does someone here know what I need to do?

I'm using MySQL version 5.0.11 on Windows Server 2003 mysqld-max-nt

Thanks!
Joelle Tegwen




--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

RE: mysqldumpslow

am 18.04.2006 01:31:10 von jbonnett

Mysqldumpslow is a Perl script so under Windows you will need to make
sure you have Perl installed and will need to explicitly invoke it via
Perl. The way the script is set up it will work automatically under Unix
because Unix has the ability to run scripts directly by identifying the
correct script processor from the first line of the script. Of course
you still need Perl installed, but that is taken for granted in most
Unix installations.

John B.

-----Original Message-----
From: Joelle Tegwen [mailto:tegwe002@umn.edu]=20
Sent: Saturday, 15 April 2006 4:32 AM
To: MySQL - Win32
Subject: mysqldumpslow

So, I'm logging slow queries because we're having some performance=20
issues and I read about mysqldumpslow and thought that would be a good=20
way to sort through the queries.

so I log in to my production machine and open a command prompt and type=20
mysqldumpslow and I get this:
'mysqldumpslow' is not recognized as an internal or external command,=20
operable program or batch file.

I couldn't find anything special on the web that I was supposed to do to

make this work does someone here know what I need to do?

I'm using MySQL version 5.0.11 on Windows Server 2003 mysqld-max-nt

Thanks!
Joelle Tegwen





--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org

Re: mysql

am 18.04.2006 11:51:30 von sandhya

Hello every one,
I am very new to this mysql db.I want ti install mysql for windows as
well as Linux.Please tell me where can i download or which type of files i
need to download.Facing Problem in doing this.

Also Tell me i want to access database through 'C' Programming.If i want to
do So......What i should have?Please tell me the libraries i need to
download and the dll's required?
Or Send me a link where i can find information regarding this?

I am thankful to you,If u help me in sorting out this problem

Regards,
Sandhya



----- Original Message -----
From:
To: ;
Sent: Tuesday, April 18, 2006 5:01 AM
Subject: RE: mysqldumpslow


> Mysqldumpslow is a Perl script so under Windows you will need to make
> sure you have Perl installed and will need to explicitly invoke it via
> Perl. The way the script is set up it will work automatically under Unix
> because Unix has the ability to run scripts directly by identifying the
> correct script processor from the first line of the script. Of course
> you still need Perl installed, but that is taken for granted in most
> Unix installations.
>
> John B.
>
> -----Original Message-----
> From: Joelle Tegwen [mailto:tegwe002@umn.edu]
> Sent: Saturday, 15 April 2006 4:32 AM
> To: MySQL - Win32
> Subject: mysqldumpslow
>
> So, I'm logging slow queries because we're having some performance
> issues and I read about mysqldumpslow and thought that would be a good
> way to sort through the queries.
>
> so I log in to my production machine and open a command prompt and type
> mysqldumpslow and I get this:
> 'mysqldumpslow' is not recognized as an internal or external command,
> operable program or batch file.
>
> I couldn't find anything special on the web that I was supposed to do to
>
> make this work does someone here know what I need to do?
>
> I'm using MySQL version 5.0.11 on Windows Server 2003 mysqld-max-nt
>
> Thanks!
> Joelle Tegwen
>
>
>
>
>
> --
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe:
http://lists.mysql.com/win32?unsub=sandhyar@amiindia.co.in
>
>



--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: Install

am 18.04.2006 18:45:26 von Daniel da Veiga

On 4/18/06, Na Derro Cartwright wrote:
> Hello all,
>
> I have just installed the 5.0 My Sql Server on my new dell and I cannot s=
eem
> to get an ODBC connector from my remote hosts to connect to it. The dell=
is
> running on Windows XP. I read that the MySql Server will run on this
> platform. What else do I have to do in order to have my remote users acc=
ess
> their databases via an ODBC connection?

You must ensure that:
1) you have granted the privileges needed for your users to access the
server, check the manual for GRANT and REVOKE syntax.
2) your network TCP/IP protocol works.
3) your server port 3306 (or whatever you're using) is open and unrestricte=
d.

Other than that, you must ensure that the server is running and that
you're able to access it locally and change/modify the privileges so
you'll let your users access the server.

--
Daniel da Veiga
Computer Operator - RS - Brazil
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
------END GEEK CODE BLOCK------

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org

Re: Install

am 18.04.2006 19:23:56 von Shawn Green

--- Daniel da Veiga wrote:

> On 4/18/06, Na Derro Cartwright wrote:
> > Hello all,
> >
> > I have just installed the 5.0 My Sql Server on my new dell and I
> cannot seem
> > to get an ODBC connector from my remote hosts to connect to it.
> The dell is
> > running on Windows XP. I read that the MySql Server will run on
> this
> > platform. What else do I have to do in order to have my remote
> users access
> > their databases via an ODBC connection?
>
> You must ensure that:
> 1) you have granted the privileges needed for your users to access
> the
> server, check the manual for GRANT and REVOKE syntax.
> 2) your network TCP/IP protocol works.
> 3) your server port 3306 (or whatever you're using) is open and
> unrestricted.

And don't forget to
4) Download and install MyODBC on the machines you want to connect
from. That way you have the correct driver to work with your MySQL
server.

The first three steps are more about making contact from ANY client.
The fourth step is specific to using ODBC.

Of course, there is an implicit zeroeth step to any project

0) RTFM.

Just by doing that, so many basic questions can be answered. However,
we all recognize that too much information can be as bad as no
information at all and for many new users the manual can appear
overwhelming. That's why we have a mailing list!! ;-)


> Other than that, you must ensure that the server is running and that
> you're able to access it locally and change/modify the privileges so
> you'll let your users access the server.
>
> --
> Daniel da Veiga
> Computer Operator - RS - Brazil
> -----BEGIN GEEK CODE BLOCK-----
> Version: 3.1
> GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
> PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
> ------END GEEK CODE BLOCK------
>

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Install

am 18.04.2006 21:22:43 von Na Derro Cartwright

Hello all,

I have just installed the 5.0 My Sql Server on my new dell and I cannot seem
to get an ODBC connector from my remote hosts to connect to it. The dell is
running on Windows XP. I read that the MySql Server will run on this
platform. What else do I have to do in order to have my remote users access
their databases via an ODBC connection?

Na Derro Cartwright



--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

RE: Install

am 19.04.2006 02:34:07 von jbonnett

You may need to check that the Windows XP firewall allows access to the
MySQL port (3360 I think by default). You can configure XP to allow this
by modify things in the Windows Firewall in Control Panel.

John B.

-----Original Message-----
From: Na Derro Cartwright [mailto:lastsilver01@comcast.net]=20
Sent: Wednesday, 19 April 2006 4:53 AM
To: win32@lists.mysql.com
Subject: Install

Hello all,=20

I have just installed the 5.0 My Sql Server on my new dell and I cannot
seem
to get an ODBC connector from my remote hosts to connect to it. The
dell is
running on Windows XP. I read that the MySql Server will run on this
platform. What else do I have to do in order to have my remote users
access
their databases via an ODBC connection?

Na Derro Cartwright




--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org

Re: Install

am 19.04.2006 06:31:32 von Dijital

Dyslexia friend John! Default port is 3306 :) Yes this should be all you
need unless you're connecting remotely with applications that do not
natively support MySQL, in which case the hosts would need the MySQL
ODBC Connector installed on them as well. Cheers!

Armando

jbonnett@sola.com.au wrote:
> You may need to check that the Windows XP firewall allows access to the
> MySQL port (3360 I think by default). You can configure XP to allow this
> by modify things in the Windows Firewall in Control Panel.
>
> John B.
>
> -----Original Message-----
> From: Na Derro Cartwright [mailto:lastsilver01@comcast.net]
> Sent: Wednesday, 19 April 2006 4:53 AM
> To: win32@lists.mysql.com
> Subject: Install
>
> Hello all,
>
> I have just installed the 5.0 My Sql Server on my new dell and I cannot
> seem
> to get an ODBC connector from my remote hosts to connect to it. The
> dell is
> running on Windows XP. I read that the MySql Server will run on this
> platform. What else do I have to do in order to have my remote users
> access
> their databases via an ODBC connection?
>
> Na Derro Cartwright
>
>
>
>

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: mysqldumpslow

am 18.05.2006 17:16:53 von Joelle Tegwen

Ok, I'm feeling pretty dumb here, but I can't figure this out. I got
Perl installed on my Windows machine and I open up perl.exe and I do....
what? I've tried googling for it but I just keep finding my own question.

Thanks
Joelle

jbonnett@sola.com.au wrote:
> Mysqldumpslow is a Perl script so under Windows you will need to make
> sure you have Perl installed and will need to explicitly invoke it via
> Perl. The way the script is set up it will work automatically under Unix
> because Unix has the ability to run scripts directly by identifying the
> correct script processor from the first line of the script. Of course
> you still need Perl installed, but that is taken for granted in most
> Unix installations.
>
> John B.
>
>



--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: mysqldumpslow

am 18.05.2006 19:38:55 von Joelle Tegwen

ok, so I got it running... thanks..

and I type
C:\Program Files\MySQL\MySQL Server 5.0\scripts>perl mysqldumpslow -s=t
-t=5 c:\mysql\slowlog20060518.txt
and I get this big long scroll of sql statements and then this:
Died at mysqldumpslow line 137, <> chunk 1.

What does that mean?
Thanks
Joelle


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: mysqldumpslow

am 18.05.2006 20:31:48 von Tobin Cataldo

I was able to reproduce the error by setting -t= actual queries in log>

Try setting -t = 1 or -t = 2. Or take a look at the log txt file and see
if you have at least 5 queries in there.


Tobin Cataldo


Joelle Tegwen wrote:
> ok, so I got it running... thanks..
>
> and I type
> C:\Program Files\MySQL\MySQL Server 5.0\scripts>perl mysqldumpslow
> -s=t -t=5 c:\mysql\slowlog20060518.txt
> and I get this big long scroll of sql statements and then this:
> Died at mysqldumpslow line 137, <> chunk 1.
>
> What does that mean?
> Thanks
> Joelle
>
>


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: mysqldumpslow

am 18.05.2006 22:31:10 von Joelle Tegwen

Ok, so I didn't get the error, but I get this huge long scroll of SQL
statements with a space between each letter. I can't even see the
beginning of the scroll because it maxes out the buffer.

I thought that saying -t=1 would only give me one query am I
misunderstanding this?

Thanks much
Joelle

Tobin Cataldo wrote:
> I was able to reproduce the error by setting -t= > actual queries in log>
>
> Try setting -t = 1 or -t = 2. Or take a look at the log txt file and
> see if you have at least 5 queries in there.
>
>
> Tobin Cataldo
>
>
> Joelle Tegwen wrote:
>> ok, so I got it running... thanks..
>>
>> and I type
>> C:\Program Files\MySQL\MySQL Server 5.0\scripts>perl mysqldumpslow
>> -s=t -t=5 c:\mysql\slowlog20060518.txt
>> and I get this big long scroll of sql statements and then this:
>> Died at mysqldumpslow line 137, <> chunk 1.
>>
>> What does that mean?
>> Thanks
>> Joelle
>>
>>
>
>

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: mysqldumpslow

am 19.05.2006 15:18:27 von Tobin Cataldo

To get the lines from the MSDOS prompt try -> right-click select all,
ctrl-c. Then paste in TextPad or something.

I have read that mysqldumpslow doesn't handle prepared statements (not
sure if this is applicable)...

You might try running the mysqldumpslow on a limited test. In fact, grab
the examples below and run the mysqldumpslow against it, and compare it
against the results I got (shown below). If you get the same, then I
would suggest looking at the structure of your slowlog... Or change
slowlog to a new log temporarily (mysql server needs to be restarted
making a change to the logs) run a few queries in the mysql> prompt
(this way you know they are not 'prepared' queries), then check against
mysqldumpslow.

My slowlog looks like this:
C:\mysql\bin\mysqld-max-nt, Version: 5.0.18-nt-max-log. started with:
TCP Port: 3306, Named Pipe: (null)
Time Id Command Argument
# Time: 060518 13:28:33
# User@Host: root[root] @ localhost [127.0.0.1]
# Query_time: 0 Lock_time: 0 Rows_sent: 1 Rows_examined: 1
SHOW VARIABLES LIKE 'datadir';
# User@Host: root[root] @ localhost [127.0.0.1]
# Query_time: 0 Lock_time: 0 Rows_sent: 1 Rows_examined: 1
SHOW VARIABLES LIKE 'log_error';
C:\mysql\bin\mysqld-max-nt, Version: 5.0.18-nt-max-log. started with:
TCP Port: 3306, Named Pipe: (null)
Time Id Command Argument
C:\mysql\bin\mysqld-max-nt, Version: 5.0.18-nt-max-log. started with:
TCP Port: 3306, Named Pipe: (null)
Time Id Command Argument


My output looks like this:
C:\mysql\scripts>perl mysqldumpslow -s=t -t=2 c:\mysql\data\slowlog2.txt

Reading mysql slow query log from c:\mysql\data\slowlog2.txt
Count: 1 Time=0.00s (0s) Lock=0.00s (0s) Rows=0.0 (0), 0users@0hosts
C:\mysql\bin\mysqld-max-nt, Version: N.N.N-nt-max-log. started with:
TCP Port: N, Named Pipe: (null)
# Time: N N:N:N
# User@Host: root[root] @ localhost [N.N.N.N]
# Query_time: N Lock_time: N Rows_sent: N Rows_examined: N
SHOW VARIABLES LIKE 'S'

Count: 1 Time=0.00s (0s) Lock=0.00s (0s) Rows=1.0 (1),
root[root]@localhost
SHOW VARIABLES LIKE 'S';
C:\mysql\bin\mysqld-max-nt, Version: N.N.N-nt-max-log. started with:
TCP Port: N, Named Pipe: (null)
C:\mysql\bin\mysqld-max-nt, Version: N.N.N-nt-max-log. started with:
TCP Port: N, Named Pipe: (null)



C:\mysql\scripts>


Tobin Cataldo

Joelle Tegwen wrote:
> Ok, so I didn't get the error, but I get this huge long scroll of SQL
> statements with a space between each letter. I can't even see the
> beginning of the scroll because it maxes out the buffer.
>
> I thought that saying -t=1 would only give me one query am I
> misunderstanding this?
>
> Thanks much
> Joelle
>
> Tobin Cataldo wrote:
>> I was able to reproduce the error by setting -t= >> actual queries in log>
>>
>> Try setting -t = 1 or -t = 2. Or take a look at the log txt file and
>> see if you have at least 5 queries in there.
>>
>>
>> Tobin Cataldo
>>
>>
>> Joelle Tegwen wrote:
>>> ok, so I got it running... thanks..
>>>
>>> and I type
>>> C:\Program Files\MySQL\MySQL Server 5.0\scripts>perl mysqldumpslow
>>> -s=t -t=5 c:\mysql\slowlog20060518.txt
>>> and I get this big long scroll of sql statements and then this:
>>> Died at mysqldumpslow line 137, <> chunk 1.
>>>
>>> What does that mean?
>>> Thanks
>>> Joelle
>>>
>>>
>>
>>
>


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: mysqldumpslow

am 19.05.2006 17:40:18 von Joelle Tegwen

When I run your script I get this:
Reading mysql slow query log from c:\mysql\slowLog20060518.txt
Count: 1 Time=0.00s (0s) Lock=0.00s (0s) Rows=0.0 (0), 0users@0hosts
C : \ m y s q l \ b i n \ m y s q l d - m a x - n t , V e r s i o n
: N . N . N N - n t - m a x - l o g . s t a
t e d w i t h :
T C P P o r t : N N N N , N a m e d P i p e : ( n u l l )
T i m e I d C o m m a n d
A r g u m e n t
# T i m e : N N N N N N N N : N N : N N
# U s e r @ H o s t : r o o t [ r o o t ] @ l o c a l h o s
t [ N N N . N . N . N ]
# Q u e r y _ t i m e : N L o c k _ t i m e : N R o w s
_ s e n t : N R o w s _ e x a m i n e d :
N
S H O W V A R I A B L E S L I K E 'S' ;
# U s e r @ H o s t : r o o t [ r o o t ] @ l o c a l h o s
t [ N N N . N . N . N ]
# Q u e r y _ t i m e : N L o c k _ t i m e : N R o w s
_ s e n t : N R o w s _ e x a m i n e d :
N
S H O W V A R I A B L E S L I K E 'S' ;
C : \ m y s q l \ b i n \ m y s q l d - m a x - n t , V e r s i o n
: N . N . N N - n t - m a x - l o g . s t a
r t e d w i t h :
T C P P o r t : N N N N , N a m e d P i p e : ( n u l l )
T i m e I d C o m m a n d
A r g u m e n t
C : \ m y s q l \ b i n \ m y s q l d - m a x - n t , V e r s i o n
: N . N . N N - n t - m a x - l o g . s t a
r t e d w i t h :
T C P P o r t : N N N N , N a m e d P i p e : ( n u l l )
T i m e I d C o m m a n d
A r g u m e n t

Yes, there really is a space between each character.

My slow log looks different than yours.
It doesn't have the first few lines. It starts right off with a query_time:
# Query_time: 11 Lock_time: 0 Rows_sent: 1 Rows_examined: 4
SELECT g.GroupID, groupName, firstName, lastName FROM activeusers u,
ugroup g, usergroup ug WHERE g.groupID = ug.groupID AND u.userID =
g.createdBy AND g.createdBy<> 767223 AND ug.userID= 767223 ORDER BY
g.groupName;
# Time: 060508 12:26:27
# User@Host: youthhood[youthhood] @ localhost [127.0.0.1]
# Query_time: 12 Lock_time: 0 Rows_sent: 0 Rows_examined: 0
SELECT g.GroupID, groupName, firstName, lastName FROM activeusers u,
ugroup g, usergroup ug WHERE g.groupID = ug.groupID AND u.userID =
g.createdBy AND g.createdBy<> 3963 AND ug.userID= 3963 ORDER BY g.groupName;
# Time: 060508 12:26:28
# User@Host: youthhood[youthhood] @ localhost [127.0.0.1]
# Query_time: 12 Lock_time: 0 Rows_sent: 1 Rows_examined: 4
SELECT g.GroupID, groupName, firstName, lastName FROM activeusers u,
ugroup g, usergroup ug WHERE g.groupID = ug.groupID AND u.userID =
g.createdBy AND g.createdBy<> 590404 AND ug.userID= 590404 ORDER BY
g.groupName;

I use views but not prepared statements. I changed my server log
location and I got the same headers that you have. I'll generate some
queries and see how it goes. Do you know why I'm getting all of the spaces?

Thanks
Joelle



--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: mysqldumpslow

am 22.05.2006 16:07:26 von Joelle Tegwen

It was a problem with the file formatting. The new file works perfectly.
Thanks for helping me out with this!

Joelle

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org