Technology

MySQL Optimization

Your mySQL very high CPU load over 100%… just skip-name-resolve=1

[mysqld]

skip-name-resolve=1
Solution Problem: #1265 Data truncated for column ….

// remove STRICT_TRANS_TABLES, ….. in my.cnf

 

// optimize large DB

max_allowed_packet = 1M
thread_cache_size = 8
myisam-recover-options = BACKUP
log_error = /var/log/mysql/error.log
expire_logs_days = 10
max_binlog_size = 100M
innodb_file_per_table = 1
myisam_sort_buffer_size = 64M
read_rnd_buffer_size = 8M
read_buffer_size = 2M
sort_buffer_size = 2M

## ini rekomendasi dari mysqltunner
#innodb_buffer_pool_size = 4G
#innodb_log_file_size = 1024M
table_open_cache = 4096
join_buffer_size = 256k
query_cache_type = 1
query_cache_limit = 4M
query_cache_size = 128M

slow_query_log = ON
long_query_time = 5
key_buffer_size = 512M
sql_mode=NO_ENGINE_SUBSTITUTION

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s