Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

change values of innodb_flush_log

Discussion in 'Database Discussion' started by mojamoi, Jan 14, 2014.

  1. mojamoi

    mojamoi Well-Known Member

    Joined:
    Jul 23, 2007
    Messages:
    186
    Likes Received:
    0
    Trophy Points:
    66
    How do I change values for 'innodb_flush_log_at_trx_commit' to 2.

    mysql> SHOW VARIABLES LIKE 'innodb_flush_log_at_trx_commit';
    +--------------------------------+-------+
    | Variable_name | Value |
    +--------------------------------+-------+
    | innodb_flush_log_at_trx_commit | 1 |
    +--------------------------------+-------+
    1 row in set (0.00 sec)
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    Add the following line to your /etc/my.cnf file:

    Code:
    innodb_flush_log_at_trx_commit=2
    Then, restart MySQL via:

    Code:
    service mysql restart
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. mojamoi

    mojamoi Well-Known Member

    Joined:
    Jul 23, 2007
    Messages:
    186
    Likes Received:
    0
    Trophy Points:
    66
    mysql takes alot of %cpu

    how do we optimize mysql
     
  4. ndzsupport

    ndzsupport Registered

    Joined:
    Oct 7, 2013
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    You can use the command " mysqladmin proc stat" to see what all mysql processes causing the load. Might need to optimize / repair that particular table/ database or query level optimization needed. Will need to find the actual problem before start optimizing.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Please open separate threads when the question or subject differs from the original post. You can post to our Optimization forum for assistance with optimizing your MySQL configuration.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice