Sie sind auf Seite 1von 5

#

#
#
#
#
#
#
#
#
#
#
#
#

The MySQL database server configuration file.


You can copy this to one of:
- "/etc/mysql/my.cnf" to set global options,
- "~/.my.cnf" to set user-specific options.
One can use all long options that the program supports.
Run program with --help to get a list of available options and with
--print-defaults to see which it would actually understand and use.
For explanations see
http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# Here is entries for some specific programs


# The following values assume you have at least 16G ram
[mysqld]
#
# * Basic Settings
#
user
pid-file
socket
port
basedir
datadir
#datadir
tmpdir
#language

=
=
=
=
=
=
=
=
=

mysql
/var/lib/mysql/mysqld.pid
/var/lib/mysql/mysqld.sock
3306
/usr
/home/lib/mysql
/var/lib/mysql
/tmp
/usr/share/mysql/english

#
# * Fine Tuning
#
#key_buffer
= 1G
#index block buffered in memory reduce disk access (Use for MyIsam)
key_buffer_size
= 128M
#thread_concurrency
= number of CPU core*2
thread_concurrency
= 16
connect_timeout
= 2000
max_connect_errors
= 10000
lock_wait_timeout
= 100
#
# * Query Cache Configuration
#
query_cache_type
= 1
# store frequently used query result in memory
query_cache_size
= 16M
query_cache_limit
= 32M
#
# * global
#
max_heap_table_size
tmp_table_size

= 256M
= 256M

max_connections
open-files-limit

= 2500
= 20480

# to avoid reopening tables when a new request for same table


# For example, for 200 concurrent running connections, you should have a table c
ache size of at least 200 N,
# where N is the maximum number of tables per join in any of the queries which y
ou execute.
table_cache
= 10000
table_definition_cache = 400
# Default to using old
# clients (those using
old_passwords
lower_case_table_names

password format for compatibility with mysql 3.x


the mysqlclient10 compatibility package).
= 1
= 1

# max Seconds an inactive connection be present


wait_timeout
= 2000
#wait_timeout would be helpful to clear the sleeping process as
t does not make any performance improvement
#since it affect the command line sessions.
#interactive_timeout
= 310

interactive_timeou

#
# * innodb Fine Tuning
#
default-storage-engine
= innodb
innodb_buffer_pool_size
= 4G
innodb_log_file_size
= 512M
innodb_use_native_aio
= 0
# Buffer held before writing changes to innodb log file
innodb_log_buffer_size
= 512M
innodb_write_io_threads
= 32
innodb_read_io_threads
= 32
#innodb_io_capactity
= 2000
innodb_buffer_pool_instances
= 8
# innodb_flush_log_at_trx_commit makes the slave slower, so disabling it
#innodb_flush_log_at_trx_commit = 2
innodb_file_per_table
= 1
# per thread (Not required)
# Threads for Mysql will be cached for reuse
thread_cache_size
= 20
join_buffer_size
= 512K
#sort_buffer_size
= 1K
#read_buffer_size
= 128K
#read_rnd_buffer_size = 2M

#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file
= /var/log/mysql/mysql.log
#general_log
= 1
#

# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.


#
#Max Query time in sec
long_query_time
= 1.50
#Min examined row limit for the query
min_examined_row_limit = 0
slow_query_log
= 1
log_output
= FILE
# Here you can see queries with especially long duration
log-error
= /var/log/mysql/mysql-error.log
slow_query_log_file
= /var/lib/mysql/mysql_slow_query.txt
log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#
other settings you may need to change.
#server-id
= 1
#log_bin
= /var/log/mysql/mysql-bin.log
#expire_logs_days
= 10
#max_binlog_size
= 100M
#binlog_do_db
= include_database_name
#binlog_ignore_db
= include_database_name
#
# * Master Configuration
#
server-id
=
1
log-bin
=
/var/lib/mysql/mysql-bin.log
expire_logs_days
=
1
max_binlog_size
=
100M
# sync_binlog makes the slave slower, so disabling it
#sync_binlog
=
1
# input the database which should be replicated
binlog-do-db
=
galore
# input the database that should be ignored for replication
#binlog-ignore-db
=
information_schema
#binlog-ignore-db
=
mysql
#binlog-ignore-db
=
performance_schema
#binlog-ignore-db
=
test
# input the tables which should be replicated
replicate-do-table
= galore.app_content_data
replicate-do-table
= galore.app_content_delivery_details
replicate-do-table
= galore.contest_scratchcodes_mapping
replicate-do-table
= galore.contest_zones_info
replicate-do-table
= galore.daemon_run_details
replicate-do-table
= galore.daemon_task_run_status
replicate-do-table
= galore.galore_answers
replicate-do-table
= galore.galore_bonuspoints_rule
replicate-do-table
= galore.galore_chargeinfo_t
replicate-do-table
= galore.galore_config
replicate-do-table
= galore.galore_daemon_status
replicate-do-table
= galore.galore_data_backup
replicate-do-table
= galore.galore_detail
replicate-do-table
= galore.galore_friends_tagging
replicate-do-table
= galore.galore_language_details
replicate-do-table
= galore.galore_mapping
replicate-do-table
= galore.galore_prize_detail

replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table
replicate-do-table

=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=

galore.galore_prize_details
galore.galore_prize_option
galore.galore_question_answer_t
galore.galore_questions
galore.galore_referral_detail
galore.galore_rule_action
galore.galore_rule_message
galore.galore_running_daemons
galore.galore_score_t
galore.galore_scratchcodes
galore.galore_set_details
galore.galore_sms_config
galore.galore_sms_details
galore.galore_stats_t
galore.galore_subscriber_lock
galore.galore_subscriber_performance_t
galore.galore_subscriber_prize
galore.galore_subscriber_questions_t
galore.galore_subscriber_t
galore.galore_subscription_detail
galore.galore_user_info_t
galore.galore_zones
galore.gprs_mobile_prefix
galore.hibernate_unique_key
galore.loyalty_sms_config
galore.mmp_sms_table
galore.monitoring_tasks
galore.monitoring_transactions
galore.subscriber_loyalty
galore.subscriber_loyalty_slabs
galore.subscriber_loyalty_transaction
galore.subscriber_registration

#
# * Slave Configuration
#
#
# * Slave Skip error code list (1396 is for create user error, 1049 is when you
try to use different databse using the specified replication database query)
# * 1062 for duplicate entry error into subscriber related table
# * 1452 foriegn key constrain
# * 1205 Error 'Lock wait timeout exceeded; try restarting transaction' on query
.
slave_skip_errors=1396,1049,1205,1062
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port
= 3306
socket
= /var/lib/mysql/mysqld.sock
#
# This group is read both both by the client and the server

# use it for options that affect everything


#
[client-server]
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket
= /var/lib/mysql/mysqld.sock
nice
= 0

Das könnte Ihnen auch gefallen