Wikipedia:Database dump import problems/sample my.cnf

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.

# [client] socket		= /tmp/mysql.sock [mysqld] 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 thread_concurrency = 2 myisam_data_pointer_size = 7 # skip-networking log-bin=mysql-bin server-id	= 1 [mysqldump] quick max_allowed_packet = 256M [mysql] no-auto-rehash max_allowed_packet = 256M [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
 * 1) Example MySQL config file for large systems.
 * 2) Added support for very large database (>4GB) and
 * 3) packets (>1MB) in order to import the Wikipedia
 * 4) database dumps.
 * 1) You can copy this file to
 * 2) /etc/my.cnf to set global options,
 * 3) mysql-data-dir/my.cnf to set server-specific options (in this
 * 4) installation this directory is /usr/local/mysql/data) or
 * 5) ~/.my.cnf to set user-specific options.
 * 1) The following options will be passed to all MySQL clients
 * 1) password	= your_password
 * 2) port		= 3306
 * 1) Here follows entries for some specific programs
 * 1) The MySQL server
 * 1) port		= 3306
 * 1) Try number of CPU's*2 for thread_concurrency
 * 1) Don't listen on a TCP/IP port at all. This can be a security enhancement,
 * 2) if all processes that need to connect to mysqld run on the same host.
 * 3) All interaction with mysqld must be made via Unix sockets or named pipes.
 * 4) Note that using this option without enabling named pipes on Windows
 * 5) (via the "enable-named-pipe" option) will render mysqld useless!
 * 1) Replication Master Server (default)
 * 2) binary logging is required for replication
 * 1) required unique id between 1 and 2^32 - 1
 * 2) defaults to 1 if master-host is not set
 * 3) but will not function as a master if omitted
 * 1) Point the following paths to different dedicated disks
 * 2) tmpdir		= /tmp/
 * 3) log-update 	= /path-to-dedicated-directory/hostname
 * 1) Remove the next comment character if you are not familiar with SQL
 * 2) safe-updates