mysql innodb_log_buffer_size和 innodb_buffer_pool_size设置

mysql>  show variables like '%binlog_cache_size%';  
+-----------------------+----------------------+  
| Variable_name         | Value                |  
+-----------------------+----------------------+  
| binlog_cache_size     | 131072               |    
| max_binlog_cache_size | 18446744073709547520 |  
+-----------------------+----------------------+

  

  

binlog_cache_size  128K:  

  

  

mysql> show variables like '%log_buffer_size%';  
+------------------------+---------+  
| Variable_name          | Value   |  
+------------------------+---------+  
| innodb_log_buffer_size | 8388608 |    
+------------------------+---------+  
1 row in set (0.00 sec)  
  
innodb_log_buffer_size  =8M  
  
mysql> show variables like '%buffer_pool_size%';  
+-------------------------+-----------+  
| Variable_name           | Value     |  
+-------------------------+-----------+  
| innodb_buffer_pool_size | 134217728 |  
+-------------------------+-----------+  
1 row in set (0.00 sec)

  

调整这两个参数大小:  

  

innodb_log_buffer_size=8M 用默认值就行  
  
innodb_buffer_pool_size=1280M  
  
mysql> show variables like '%innodb_log_buffer_size%';  
+------------------------+----------+  
| Variable_name          | Value    |  
+------------------------+----------+  
| innodb_log_buffer_size | 83886080 |  
+------------------------+----------+  
1 row in set (0.00 sec)  
  
mysql> show variables like '%innodb_buffer_pool_size%';  
+-------------------------+------------+  
| Variable_name           | Value      |  
+-------------------------+------------+  
| innodb_buffer_pool_size | 1342177280 |  
+-------------------------+------------+  
1 row in set (0.00 sec)