Announcement

Announcement Module
Collapse
No announcement yet.

Need to view activity on database

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need to view activity on database

    I'm trying to run a delete and it's taking forever.
    I usually work with SQL Server and can do an sp_who to determine if a spid is increasing in CPU and memory. It also tells me if something is being blocked.
    How would I do that within MYSQL and using no 3rd party tools?

    Thanks in advance

  • #2
    Figured it out -
    Here are the 'show' commands you can use at the command prompt
    The one in red show's activity on the DB -



    SHOW has many forms that provide information about databases,
    tables, columns, or status information about the server.
    This section describes those following:

    SHOW [FULL] COLUMNS FROM tbl_name [FROM db_name] [LIKE 'pattern']
    SHOW CREATE DATABASE db_name
    SHOW CREATE TABLE tbl_name
    SHOW DATABASES [LIKE 'pattern']
    SHOW ENGINE engine_name {LOGS | STATUS }
    SHOW [STORAGE] ENGINES
    SHOW ERRORS [LIMIT [offset,] row_count]
    SHOW GRANTS FOR user D D
    SHOW INDEX FROM tbl_name [FROM db_name]
    SHOW INNODB STATUS
    SHOW [BDB] LOGS
    SHOW PRIVILEGES
    SHOW [FULL] PROCESSLIST
    SHOW [GLOBAL | SESSION] STATUS [LIKE 'pattern']
    SHOW TABLE STATUS [FROM db_name] [LIKE 'pattern']
    SHOW [OPEN] TABLES [FROM db_name] [LIKE 'pattern']
    SHOW [GLOBAL | SESSION] VARIABLES [LIKE 'pattern']
    SHOW WARNINGS [LIMIT [offset,] row_count]


    The SHOW statement also has forms that provide information about
    replication master and slave servers and are described in [Replication
    SQL]:

    SHOW BINLOG EVENTS
    SHOW MASTER LOGS
    SHOW MASTER STATUS
    SHOW SLAVE HOSTS
    SHOW SLAVE STATUS

    Comment

    Working...
    X