Wednesday, June 8, 2016

Default location for reading my.cnf file


Running this command will give you some useful information and inform you on where the default options are read from and in what order:

mysqld --verbose --help | head -15

On my system this is what it returns:


# mysqld --verbose --help | head -15
2016-06-08 11:24:30 0 [Warning] Using unique option prefix log-err instead of log_error is deprecated and will be removed in a future release. Please use the full name instead.
2016-06-08 11:24:30 0 [Note] mysqld (mysqld 5.6.24-72.2-log) starting as process 25165 ...
2016-06-08 11:24:30 25165 [Note] Plugin 'FEDERATED' is disabled.
mysqld  Ver 5.6.24-72.2-log for Linux on x86_64 (Source distribution)
Copyright (c) 2009-2015 Percona LLC and/or its affiliates
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Starts the MySQL database server.

Usage: mysqld [OPTIONS]

Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf 

The following groups are read: mysqld server mysqld-5.6
2016-06-08 11:24:30 25165 [Note] Binlog end
2016-06-08 11:24:30 25165 [Note] Shutting down plugin 'CSV'
2016-06-08 11:24:30 25165 [Note] Shutting down plugin 'MyISAM'

No comments:

Post a Comment