0

Third day in a row I find my sites down. Reason: mysql not running. Doing sudo mysql restart — and everything is up again (for few hours). But why the hell mysql has stopped?

Here are the last lines of log:

              482 Connect   zslon_sweetbread@localhost on zslon_sweetbread
              482 Query     SET NAMES 'utf8'
              482 Query     DESCRIBE `cms_model_image`
              482 Query     SELECT `cms_model_image`.* FROM `cms_model_image` WHERE (((`cms_model_image`.`id` = 962)))
              483 Connect   zslon_sweetbread@localhost on zslon_sweetbread
              483 Query     SET NAMES 'utf8'
              483 Query     DESCRIBE `cms_model_image`
              483 Query     SELECT `cms_model_image`.* FROM `cms_model_image` WHERE (((`cms_model_image`.`id` = 958)))
130211 16:51:31   482 Quit
                  483 Quit
/usr/sbin/mysqld, Version: 5.5.28-0ubuntu0.12.04.3-log ((Ubuntu)). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time                 Id Command    Argument
/usr/sbin/mysqld, Version: 5.5.28-0ubuntu0.12.04.3-log ((Ubuntu)). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time                 Id Command    Argument
/usr/sbin/mysqld, Version: 5.5.28-0ubuntu0.12.04.3-log ((Ubuntu)). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time                 Id Command    Argument
/usr/sbin/mysqld, Version: 5.5.28-0ubuntu0.12.04.3-log ((Ubuntu)). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time                 Id Command    Argument
/usr/sbin/mysqld, Version: 5.5.28-0ubuntu0.12.04.3-log ((Ubuntu)). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time                 Id Command    Argument
/usr/sbin/mysqld, Version: 5.5.28-0ubuntu0.12.04.3-log ((Ubuntu)). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time                 Id Command    Argument
/usr/sbin/mysqld, Version: 5.5.28-0ubuntu0.12.04.3-log ((Ubuntu)). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time                 Id Command    Argument
/usr/sbin/mysqld, Version: 5.5.28-0ubuntu0.12.04.3-log ((Ubuntu)). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time                 Id Command    Argument
/usr/sbin/mysqld, Version: 5.5.28-0ubuntu0.12.04.3-log ((Ubuntu)). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time                 Id Command    Argument
/usr/sbin/mysqld, Version: 5.5.28-0ubuntu0.12.04.3-log ((Ubuntu)). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time                 Id Command    Argument
/usr/sbin/mysqld, Version: 5.5.28-0ubuntu0.12.04.3-log ((Ubuntu)). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time                 Id Command    Argument
/usr/sbin/mysqld, Version: 5.5.28-0ubuntu0.12.04.3-log ((Ubuntu)). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time                 Id Command    Argument
/usr/sbin/mysqld, Version: 5.5.28-0ubuntu0.12.04.3-log ((Ubuntu)). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time                 Id Command    Argument
/usr/sbin/mysqld, Version: 5.5.28-0ubuntu0.12.04.3-log ((Ubuntu)). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time                 Id Command    Argument
/usr/sbin/mysqld, Version: 5.5.28-0ubuntu0.12.04.3-log ((Ubuntu)). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time                 Id Command    Argument
/usr/sbin/mysqld, Version: 5.5.28-0ubuntu0.12.04.3-log ((Ubuntu)). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time                 Id Command    Argument
/usr/sbin/mysqld, Version: 5.5.28-0ubuntu0.12.04.3-log ((Ubuntu)). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time                 Id Command    Argument

Can't understand... Regular queries, but then for some reason somewhat repeating "/usr/sbin/mysqld, Version: 5.5.28-0ubuntu0.12.04.3-log ((Ubuntu)). started with: Tcp port: 3306 Unix socket: /var/run/mysqld/mysqld.sock". What is this? Is this an attempt to restart or what? If I do "sudo service mysql restart", it works fine. What the cause, how to fix this?

  • post mysql error.log and/or syslog. – Tom Geee Feb 11 '13 at 18:34
  • /var/log/mysql.err is blank, what do you mean as 'syslog' ? – Dmitry Feb 11 '13 at 19:16
0

From the symptoms you posted, I think you run out of disk space in /var

If it is not the case, enable core dump for the MySQL server. Before you start the server, run:

ulimit -c unlimited

Then after a crash, search for files named "core". The you can run a gdb backtrace to see the stack at the crash.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.