Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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; source install: /usr/local/var

global

user

~/my.cnf

global, server-specific

Below are sample settings for a simple development laptop /etc/my.cnf:

[mysqld]
socket=/var/mysql/mysql.sock
default-storage-engine=InnoDB
innodb_data_home_dir = /usr/local/mysql/data
innodb_data_file_path=ibdata1:10M:autoextend
innodb_flush_log_at_trx_commit=1
[client]
socket=/var/mysql/mysql.sock
  • No labels