The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mysql service failing

Discussion in 'General Discussion' started by exodux, Oct 31, 2004.

  1. exodux

    exodux Well-Known Member

    Joined:
    Apr 12, 2004
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Brisbane, Queensland, Australia
    Anyone got any ideas as to why MySQL wouldnt be starting?

    I've recently done a install of postgres database but which to that, it didnt do anything to mysql after the install up until about now.

    error i`m getting in cpanel WHM when restarting the service -

    Attempting to restart mysql
    Waiting for mysql to restart.... . . . . . . . . . . finished.

    mysql status root 1373 0.0 0.0 4432 4 ? S Sep15 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/server1.domain.com.pid
    mysql 1419 0.0 0.1 54556 1028 ? S Sep15 0:50 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/server1.domain.com.pid --skip-locking --socket=/var/lib/mysql/mysql.sock



    DBI connect('mysql:localhost','root',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /scripts/restartsrv_mysql line 56 mysql has failed, please contact the sysadmin (result was "mysql has failed").
     
  2. exodux

    exodux Well-Known Member

    Joined:
    Apr 12, 2004
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Brisbane, Queensland, Australia
    Seems that a cron job is running each night to automaticly update cpanel/whm to which it has also tried to do a mysql update. From the service email i received, it seems that it didnt do to well and that apon starting, it didnt start again.

    I've since rebooted the server to which this fixed the problem.

    I did try restarting many other services on the server through the SSH console, but they had started successfully leaving only the problem with mysql to start from which this was caused by a cpanel update.

    To those who are interested in reading this, always resort to rebooting the server last if nothing else works.
     
  3. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    killall -9 mysqld safe_mysqld mysqld_safe
    /scripts/restartsrv_mysql


    should have the same effect
     
  4. jkims

    jkims Registered

    Joined:
    Jan 8, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I was wondering if anyone else has had this problem. I have the same problem but rebooting has not fixed the problem.

    Mysql is still down and will not restart. As far as I can tell there are no instances of mysql processes running.

    Any help would be highly appreciated.
     
  5. jrehmer

    jrehmer Well-Known Member

    Joined:
    Apr 10, 2003
    Messages:
    287
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Denver, CO
    I get the following EVERY time MySQL starts up (but it will only start up and stay started up if I manually start it, it will not come up on a reboot what so ever):

    041031 11:05:28 mysqld ended

    041031 11:05:28 mysqld started
    041031 11:05:28 Warning: Asked for 196608 thread stack, but got 126976
    041031 11:05:28 InnoDB: Started
    /usr/sbin/mysqld: ready for connections.
    Version: '4.0.22-standard' socket: '/var/lib/mysql/mysql.sock' port: 3306 Official MySQL RPM
     
  6. jrehmer

    jrehmer Well-Known Member

    Joined:
    Apr 10, 2003
    Messages:
    287
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Denver, CO
    here's another one, it looks like its trying to make temp tiles in /tmp and its not working correctly because I have securetmp on?

    041031 11:15:45 mysqld started
    041031 11:15:45 Warning: Asked for 196608 thread stack, but got 126976
    /usr/sbin/mysqld: Can't create/write to file '/tmp/ibCimikU' (Errcode: 13)
    041031 11:15:45 InnoDB: Error: unable to create temporary file; errno: 13
    041031 11:15:45 Can't init databases
    041031 11:15:45 Aborting

    041031 11:15:45 InnoDB: Warning: shutting down a not properly started
    InnoDB: or created database!
    041031 11:15:45 /usr/sbin/mysqld: Shutdown Complete

    041031 11:15:45 mysqld ended
     
  7. TDD

    TDD Active Member

    Joined:
    Dec 21, 2002
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    The issue was that /tmp was chmod to 755, so MySQL couldn't create it's temporary
    files. I chmod it to 777 and MySQL could start without error.
     
Loading...

Share This Page