Ad Widget

Collapse

Mysql hung

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kerrygeek
    Senior Member
    • Dec 2008
    • 115

    #1

    Mysql hung

    I tried to look at my new Zabbix server (1.6.2) today and none of the graphs would respond. When I ssh to the server, mysql was hung and using 14% CPU. I restarted mysql and everything is fine now but I'd like to know if there's something I need to do to prevent it from happening again.

    Also, I'm a total newbie at mysql, before I started working with Zabbix I had never heard of InnoDB. How can I tell if it is compiled with InnoDB and if not, are there instructions somewhere about how to make sure I have it next time? Or is it something I can add if I don't already have it? Do I need to start over?

    Thanks,
    Kerry
  • Calimero
    Senior Member
    • Nov 2006
    • 481

    #2
    Log on to mysql:

    mysql -u root -p ...

    (you don't need root access to check innodb availability though).

    Then try:

    mysql> show variables like 'have_innodb';

    Value should be 'YES'.

    You can also try:

    mysl> SHOW ENGINE INNODB STATUS\G

    which will display a lot of innodb status info.

    Most linux distros provide mysql packages with innodb so you don't usually need to look for a specific version.

    Check mysql's error log usually found in <datadir>/<hostname>.err :

    SHOW VARIABLES LIKE 'datadir' to find out about the datadir

    Comment

    • Kerrygeek
      Senior Member
      • Dec 2008
      • 115

      #3
      Thanks, that was exactly what I needed! It says I do have Innodb, I spent last night researching MySQL and this forum so I guess my next project is to try to optimize the database. I haven't figured out yet what caused it to hang yesterday but I'll keep beating on it before I unleash it on the rest of the company. So far it has already alerted me to a Citrix server that went down that the techs didn't even know about yet.

      Thanks for your help and all the others who have answered all my questions in the last week when I've been setting up this new server.

      Kerry

      Comment

      Working...