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 Server Failing to start

Discussion in 'Database Discussions' started by Matthew Ridings, Mar 26, 2015.

  1. Matthew Ridings

    Joined:
    Mar 26, 2015
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Manchester
    cPanel Access Level:
    Root Administrator
    Hi There :)

    I'm hoping someone can help me out here because this issue has been driving me mad I don't no what's happened at all but yesterday the MySQL server stopped running failed to start and keeps refusing to start and presents me with this message every time..

    Code:
    Waiting for “mysql” to start …………
    …failed.
    
    Service Error
    The “mysql” service failed to start.
    
    Startup Log
    Starting MySQL....... ERROR! The server quit without updating PID file (/var/lib/mysql/server1.ultimate-webhost.com.pid).
    
    Log Messages
    150326 21:37:13 mysqld_safe mysqld from pid file /var/lib/mysql/server1.ultimate-webhost.com.pid ended
    150326 21:36:55 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    150326 21:36:49 mysqld_safe mysqld from pid file /var/lib/mysql/server1.ultimate-webhost.com.pid ended
    150326 21:36:31 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    150326 21:36:25 mysqld_safe mysqld from pid file /var/lib/mysql/server1.ultimate-webhost.com.pid ended
    150326 21:36:07 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    150326 17:37:30 mysqld_safe mysqld from pid file /var/lib/mysql/server1.ultimate-webhost.com.pid ended
    150326 17:37:12 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    150326 16:06:43 mysqld_safe mysqld from pid file /var/lib/mysql/server1.ultimate-webhost.com.pid ended
    
    I've logged into SSH tried starting it from there as well and gives me this error message..

    Code:
    root@server1 [~]# /etc/init.d/mysql restart
    ERROR! MySQL server PID file could not be found!
    Starting MySQL................... ERROR! The server quit without updating PID file (/var/lib/mysql/server1.ultimate-webhost.com.pid).
    
    I've looked all this up threw the web found similar issues even on here followed the steps which have been left and still the same outcome :(

    I hope someone can help me on this as I'm confused to what has happened and how its gone down here is a log from server1.ultimate-webhost.com.err

    Code:
    150326 21:36:55 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    2015-03-26 21:36:55 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
    2015-03-26 21:36:55 8751 [Note] Plugin 'FEDERATED' is disabled.
    2015-03-26 21:36:55 8751 [Note] InnoDB: Using atomics to ref count buffer pool pages
    2015-03-26 21:36:55 8751 [Note] InnoDB: The InnoDB memory heap is disabled
    2015-03-26 21:36:55 8751 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2015-03-26 21:36:55 8751 [Note] InnoDB: Memory barrier is not used
    2015-03-26 21:36:55 8751 [Note] InnoDB: Compressed tables use zlib 1.2.3
    2015-03-26 21:36:55 8751 [Note] InnoDB: Using Linux native AIO
    2015-03-26 21:36:55 8751 [Note] InnoDB: Not using CPU crc32 instructions
    2015-03-26 21:36:55 8751 [Note] InnoDB: Initializing buffer pool, size = 128.0M
    2015-03-26 21:36:55 8751 [Note] InnoDB: Completed initialization of buffer pool
    2015-03-26 21:36:55 8751 [Note] InnoDB: Highest supported file format is Barracuda.
    2015-03-26 21:37:13 8751 [ERROR] InnoDB: Tried to read 65536 bytes at offset 6836224. Was only able to read 40960.
    2015-03-26 21:37:13 7f54fd2fb720  InnoDB: Operating system error number 2 in a file operation.
    InnoDB: The error means the system cannot find the path specified.
    InnoDB: If you are installing InnoDB, remember that you must create
    InnoDB: directories yourself, InnoDB does not create them.
    2015-03-26 21:37:13 8751 [ERROR] InnoDB: File (unknown): 'read' returned OS error 71. Cannot continue operation
    150326 21:37:13 mysqld_safe mysqld from pid file /var/lib/mysql/server1.ultimate-webhost.com.pid ended
    
    I hope someone knows what to do as I don't have any recent backups atal :(
     
  2. Patrick Heinz

    Patrick Heinz Active Member

    Joined:
    Mar 14, 2015
    Messages:
    26
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Brasil
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Did you change the MySQL data dir?
    Check in your /etc/my.cnf if the paths are right.
     
  3. Matthew Ridings

    Joined:
    Mar 26, 2015
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Manchester
    cPanel Access Level:
    Root Administrator
    I've not changed nothing this just randomly happened

    this is what's in my.cnf

    Code:
    [mysqld]
    nnodb_buffer_pool_size=134217728
    max_allowed_packet=268435456
    open_files_limit=10000
    default-storage-engine=MyISAM
    innodb_file_per_table=1
    
     
  4. Patrick Heinz

    Patrick Heinz Active Member

    Joined:
    Mar 14, 2015
    Messages:
    26
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Brasil
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hum..
    Looks like a default configuration.

    Try to add to cnf:

    local-infile=0

    EDIT:

    In your 1st cnf line, the correct parameter is
    innodb_buffer_pool_size
     
  5. Matthew Ridings

    Joined:
    Mar 26, 2015
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Manchester
    cPanel Access Level:
    Root Administrator
    added and edited still not starting
     
  6. Patrick Heinz

    Patrick Heinz Active Member

    Joined:
    Mar 14, 2015
    Messages:
    26
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Brasil
    cPanel Access Level:
    Root Administrator
    Twitter:
    Googling the first error:
    , seems like to be a i/o error.
    But you can try to add the parameter
    Code:
    innodb_force_recovery = 
    from 1 to 6. I really don't have more sql skills, but that can help you:
    Forcing InnoDB Recovery

    Good luck!
     
    #6 Patrick Heinz, Mar 26, 2015
    Last edited: Mar 26, 2015
  7. Matthew Ridings

    Joined:
    Mar 26, 2015
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Manchester
    cPanel Access Level:
    Root Administrator
    Thanks for your help I tried this but don't seem to have made any progress with that method still failing to start :(
     
  8. triantech

    triantech Well-Known Member

    Joined:
    Jul 1, 2014
    Messages:
    145
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Kochi, India, India
    cPanel Access Level:
    Root Administrator
    Hey Matt,

    Are you on a VPS or a physical server ? Did you try putting the value innodb_force_recovery as 1 and
    attempting a restart ? You get the same errors ?
     
  9. Matthew Ridings

    Joined:
    Mar 26, 2015
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Manchester
    cPanel Access Level:
    Root Administrator
    I'm on a physical server and have tried restarting with the innodb_force_recovery and still get the same result.
     
  10. triantech

    triantech Well-Known Member

    Joined:
    Jul 1, 2014
    Messages:
    145
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Kochi, India, India
    cPanel Access Level:
    Root Administrator
    Hey,

    Looks to be a hardware - disk related issue as Patrick suggested. Meanwhile, make sure
    your /tmp isnt ful ?
     
  11. Matthew Ridings

    Joined:
    Mar 26, 2015
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Manchester
    cPanel Access Level:
    Root Administrator
    tmp isn't full only 4% of it being used just don't understand how its randomly happened because no one has made any edits at all to make it go off the way it has everything else is working on whm fine apart from database server and the parts that need the database :(
     
  12. 24x7ss

    24x7ss Well-Known Member

    Joined:
    Sep 30, 2014
    Messages:
    271
    Likes Received:
    16
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    It seems that Innodb of your server gets crashed and you have to go with innodb recovery. First check if Innodb engine is installed or not. You can check it from mysql prompt and fire below command.

    show engines;

    If it is showing no in Innodb engine then you have to install Innodb engine again and I hope you are having backup of your databases.
     
  13. Matthew Ridings

    Joined:
    Mar 26, 2015
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Manchester
    cPanel Access Level:
    Root Administrator
    this is what i get when trying to use the mysql prompt
    Code:
    root@server1 [~]# mysql
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    
     
  14. 24x7ss

    24x7ss Well-Known Member

    Joined:
    Sep 30, 2014
    Messages:
    271
    Likes Received:
    16
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Error clearly shows that mysql socket file is missing. Try to create symlinked mysql socket file. That file connects to mysql.sock in temp.
     
  15. triantech

    triantech Well-Known Member

    Joined:
    Jul 1, 2014
    Messages:
    145
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Kochi, India, India
    cPanel Access Level:
    Root Administrator
    His MySQL is not starting at the first place.
     
  16. 24x7ss

    24x7ss Well-Known Member

    Joined:
    Sep 30, 2014
    Messages:
    271
    Likes Received:
    16
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    ok, do one thing open my.cnf and comment out all innodb entries and insert skip-innodb. This will skip your Innodb and start mysql with other engines.
     
  17. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  18. Matthew Ridings

    Joined:
    Mar 26, 2015
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Manchester
    cPanel Access Level:
    Root Administrator
    I manage to get it all sorted in the end thanks for the help I got it running without innodb then noticed permission errors then some other error afterwards then managed to get innodb started in the end :)
     
  19. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  20. Khaled A.

    Khaled A. Registered

    Joined:
    Jun 11, 2015
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    kuwait
    cPanel Access Level:
    Website Owner
    Hi,

    In my case it was "clamavconnector" plugin in WHM panel that brought down my database. I disabled it and now back online.
     
Loading...

Share This Page