Wikipedia:Database dump import problems/sample my.cnf

From Wikipedia, the free encyclopedia

Following is a sample my.cnf configuration file for MySQL that will allow you to import the Wikipedia database dumps without command line options or stream edits. (Verified en.wikipedia.org "cur" table on mysql-standard-5.0.7 as of 8 July 2005). You must however ensure that you have enough free disk space and that your operating system supports files larger than 4 gigabytes.

# Example MySQL config file for large systems.
# Added support for very large database (>4GB) and
# packets (>1MB) in order to import the Wikipedia
# database dumps.
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /usr/local/mysql/data) or
# ~/.my.cnf to set user-specific options.

# The following options will be passed to all MySQL clients
[client]
#password	= your_password
#port		= 3306
socket		= /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
#port		= 3306
socket		= /tmp/mysql.sock
skip-locking
key_buffer = 256M
max_allowed_packet = 256M
table_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache = 8
query_cache_size= 16M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 2
myisam_data_pointer_size = 7

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
# 
skip-networking

# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id	= 1

# Point the following paths to different dedicated disks
#tmpdir		= /tmp/		
#log-update 	= /path-to-dedicated-directory/hostname

[mysqldump]
quick
max_allowed_packet = 256M

[mysql]
no-auto-rehash
max_allowed_packet = 256M
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout