MySQL

/etc/mysql/my.cnf

open-files-limit = 8192

key_buffer              = 64M
max_allowed_packet      = 1M
thread_stack            = 192K
thread_concurrency      = 4
max_connections         = 300
table_cache             = 2048

ft_min_word_len         = 3
local-infile            = 0
back_log                = 50
max_heap_table_size     = 64M
sort_buffer_size        = 8M
join_buffer_size        = 8M
tmp_table_size          = 128M
key_buffer_size         = 32M
read_buffer_size        = 2M
read_rnd_buffer_size    = 16M
bulk_insert_buffer_size = 32M
myisam_sort_buffer_size = 128M
myisam_repair_threads   = 1
max_tmp_tables          = 300
wait_timeout            = 60

safe-show-database
skip_show_database
safe-user-create
skip-locking
memlock
log_warnings
myisam_recover

query_cache_size        = 64M

log_slow_queries        = /var/log/mysql/mysql-slow.log
long_query_time = 4

innodb_buffer_pool_size = 512M
innodb_additional_mem_pool_size = 8M
innodb_log_file_size = 64M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

/usr/bin/mysqld_safe

# Make sure that directory for $safe_mysql_unix_port exists
mysql_unix_port_dir=`dirname $safe_mysql_unix_port`
if [ ! -d $mysql_unix_port_dir ]
then
#  mkdir $mysql_unix_port_dir
  ln -s /var/www/var/run/mysqld/ /var/run/mysqld
  chown $user $mysql_unix_port_dir
  chmod 755 $mysql_unix_port_dir
fi
rm /var/run/mysqld

/etc/apparmor.d/usr.sbin.mysqld

  /var/www/var/run/mysqld/mysqld.pid w,
  /var/www/var/run/mysqld/mysqld.sock w,
use mysql;
DELETE FROM user WHERE host<>'localhost';
DELETE FROM user WHERE user='';
DELETE FROM db WHERE db LIKE 'test%';

Replication



http://www.mysql.com/
http://code.google.com/p/mysql-log-filter/

 
Logged in as: Oszkár Kmetti
sql/mysql.txt · Last modified: 2009.07.09 14:39 by oszi
 
Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki