DevReview.net

More development notices …

Archive for the ‘mysql’ Category

Setup InnoDB default MySQL engine

leave a comment

1. stop mysql-server if running

/usr/local/etc/rc.d/mysql-server stop

2. update /etc/my.cfg with adding new config

default-storage_engine = InnoDB

and uncomment next lines

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /var/db/mysql/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /var/db/mysql/
# You can set .._buffer_pool_size up to 50 – 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

3. start mysql-server again

/usr/local/etc/rc.d/mysql-server start

4. check engine property, after logged into mysql>

show variables like “%engine%”;

done

Written by admin

October 17th, 2010 at 8:12 am

Posted in mysql

Tagged with ,

Problem IP 127.255.255.255 in statistics

leave a comment

It could happen with some php-mysql scripts if you moved from 32-bit platform to 64-bit.

Quick fix for that – replace int(11) on bigint(20) in mysql tables.

Written by admin

August 7th, 2010 at 7:45 pm

Posted in mysql, php

Tagged with , ,