Child pages
  • MySQL my.cnf (2.x)
Skip to end of metadata
Go to start of metadata

You can configure MySQL to read a wide variety of startup options from a file named my.cnf. Settings are scoped and can be overridden by file location:

Scope

Location

Override

global

/etc/my.cnf

 

server-specific

binary install: /usr/local/mysql/data/my.cnf; source install: /usr/local/var/my.cnf

global

user

~/my.cnf

global, server-specific

Below is a minimalist MySQL 5.1 configuration file for a development laptop /etc/my.cnf:

[mysqld]
default-storage-engine=InnoDB
lower_case_table_names=1

(warning) Restart MySQL in order for the new settings to take effect.

  • No labels