Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A MySQL adatbáziskezelő rendszernél a külső kulcsok használata csak InnoDB típusú táblaszerkezetnél lehetséges, a InnoDB szerkezetű táblák nem támogatják.

Monitorozás

http://alvinalexander.com/blog/post/mysql/how-show-open-database-connections-mysqlImage Removed

The MySQL show status command

You can show MySQL open database connections (and other MySQL database parameters) using the MySQL show status command, like this: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)
All those rows and values that are printed out correspond to MySQL variables that you can look at. Notice that I use like 'Conn%'in the first example to show variables that look like "Connection", then got a little wiser in my second MySQL show status query.

MySQL show processlist

Here's what my MySQL processlist looks like when I had my Java application actively running under Tomcat: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)
And here's what it looked like after I shut Tomcat down:mysql> show processlist;
-------------------------------------------------------+

Id

User

Host

db

Command

Time

State

Info

-------------------------------------------------------+

3

root

localhost

webapp

Query

0

NULL

show processlist

-------------------------------------------------------+
1 row in set (0.00 sec)