change values of innodb_flush_log

mojamoi

Well-Known Member
Jul 23, 2007
186
0
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)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
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.
 

ndzsupport

Registered
Oct 7, 2013
2
0
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.