• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

MySQL threads... need little help

#1
When I do "htop" i see many MySQL processes.. but when I do "SHOW PROCESSLIST" I see no processes. Can someone please tell me what's going on?

I am using Debian 64 bit Squeeze.

mysql.jpg
 

Insy

Well-known member
#3
You're confusing two different things:
- What's you see with htop is MySQL processes. Even if there is no current request, they remain in memory.
- What's you see with 'SHOW PROCESSLIST' are SQL queries which are currently running.

On my development machine, I've:
Code:
_mysql    130  0,0  1,3  2671600  55052  ??  S    8:25    0:00.56 /opt/local/libexec/mysqld --basedir=/opt/local --datadir=/opt/local/var/db/mysql5 --user=_mysql --log-error=/opt/local/var/db/mysql5/localhost.err --pid-file=/opt/local/var/db/mysql5/localhost.pid
root        79  0,0  0,0  2435548    804  ??  S    8:25    0:00.01 /bin/sh /opt/local/lib/mysql5/bin/mysqld_safe --datadir=/opt/local/var/db/mysql5 --pid-file=/opt/local/var/db/mysql5/localhost.pid
for processes.

And:
Code:
mysql> SHOW PROCESSLIST;
+----+------+-----------+------+---------+------+-------+------------------+
| Id | User | Host      | db  | Command | Time | State | Info            |
+----+------+-----------+------+---------+------+-------+------------------+
|  1 | root | localhost | NULL | Query  |    0 | NULL  | SHOW PROCESSLIST |
+----+------+-----------+------+---------+------+-------+------------------+
1 row in set (0.00 sec)
for running queries.