Show Mysql Connections

Posted: November 23, 2011 in Mysql

Mysql show command status

mysql> SHOW STATUS;

mysql> SHOW GLOBAL STATUS;

mysql> show status like ‘Conn%’;

+—————+——-+

| Variable_name | Value |

+—————+——-+

| Connections   | 8     |

+—————+——-+

1 row in set (0.00 sec)

 

mysql> show status like ‘%onn%’;

+————————–+——-+

| Variable_name            | Value |

+————————–+——-+

| Aborted_connects         | 0     |

| Connections              | 8     |

| Max_used_connections     | 4     |

| Ssl_client_connects      | 0     |

| Ssl_connect_renegotiates | 0     |

| Ssl_finished_connects    | 0     |

| Threads_connected        | 4     |

+————————–+——-+

7 rows in set (0.00 sec)

 

Mysql show process List

mysql> show processlist;

+—-+——+—————–+——–+———+——+——-+——————+

| Id | User | Host            | db     | Command | Time | State | Info             |

+—-+——+—————–+——–+———+——+——-+——————+

|  3 | root | localhost       | webapp | Query   |    0 | NULL  | show processlist |

|  5 | root | localhost:61704 | webapp | Sleep   |  208 |       | NULL             |

|  6 | root | localhost:61705 | webapp | Sleep   |  208 |       | NULL             |

|  7 | root | localhost:61706 | webapp | Sleep   |  208 |       | NULL             |

+—-+——+—————–+——–+———+——+——-+——————+

4 rows in set (0.00 sec)

 

Increasing Max MySQL Connections

[mysqld]

safe-show-database

innodb_data_file_path=ibdata1:10M:autoextend

datadir=/var/lib/mysql

socket=/var/lib/mysql/mysql.sock

max_connections=250

 

 

http://dev.mysql.com/doc/refman/5.0/en/show-status.html

http://kb.mediatemple.net/questions/711/(dv)+Increasing+Max+MySQL+Connections#dv

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s