mytop configuration

teedee

Verified User
Joined
Oct 30, 2003
Messages
140
Hi,

How do I configure mytop to show all mysql threads after using the "mytop" command ?

At the moment I get the following

PHP:
 [root@server1 mytop-1.4]# mytop
Cannot connect to MySQL server. Please check the:

  * database you specified "test" (default is "test")
  * username you specified "root" (default is "root")
  * password you specified "" (default is "")
  * hostname you specified "localhost" (default is "localhost")
  * port you specified "3306" (default is 3306)
  * socket you specified "" (default is "")

The options my be specified on the command-line or in a ~/.mytop
config file. See the manual (perldoc mytop) for details.

Here's the exact error from DBI. It might help you debug:

Access denied for user 'root'@'localhost' (using password: NO)
 
ok, but this does not allow me to see all MySQL queries in Mytop as I still have to specify a database

If I have one db that is causing high loads how can I find which database it is and the user of that database ??
 
late :-(

Sorry for replying in a old thread.. but since i had the same problem i thought i will paste the answer to this here which might help the others doing the same..

You need to specify the login details for mysql user for mytop to work..

Normally the syntax is as follows:

#/usr/local/bin/mytop -s /tmp -d DATABASE -u user -p pass

However this will only show the usage of the database DATABASE. If you want to check on all the databases use the option

/usr/local/bin/mytop -s /tmp -u da_admin -ppass


The better option as mentioned in the error is to specify the details in the file /root/.mytop

a sample config file "~/.mytop" is as shown below:

user=da_admin
pass=
host=localhost
db=test
delay=5
port=3306
socket=
batchmode=0
header=1
color=1
idle=1


Hope this help :)
 
Back
Top