MySQL の設定ファイルの場所 - redhat linux server

redhat linuxのMySQL設定ファイルのデフォルトの場所はどこですか?

今見つけました、/etc/my.cnfです。

解説 (0)

を実行することで、欲しい情報を見つけることができます。

mysql --help

または

mysqld --help --verbose

これを試してみました。

    mysql --help | grep Default -A 1

そして、出力。

                      (Defaults to on; use --skip-auto-rehash to disable.)
  -A, --no-auto-rehash 
--
                      (Defaults to on; use --skip-line-numbers to disable.)
  -L, --skip-line-numbers 
--
                      (Defaults to on; use --skip-column-names to disable.)
  -N, --skip-column-names 
--
                      (Defaults to on; use --skip-reconnect to disable.)
  -s, --silent        Be more silent. Print results with a tab as separator,
--
  --default-auth=name Default authentication client-side plugin to use.
  --binary-mode       By default, ASCII '\0' is disallowed and '\r\n' is
--
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf 
解説 (2)

は、/etc/mysql/my.cnfに配置されています。

解説 (1)

デフォルトオプションは、次のファイルから指定された順序で読み取られます。

/etc/mysql/my.cnf 
/etc/my.cnf 
~/.my.cnf 
解説 (0)

RHシステムでは、MySQL構成ファイルはデフォルトで/etc/my.cnfの下にあります。

解説 (0)

それらのすべては良い候補者のようでした:

/etc/my.cnf
/etc/mysql/my.cnf
/var/lib/mysql/my.cnf
...

多くの場合、ps :を使用してシステムプロセスリストを確認できます。

server ~ # ps ax | grep '[m]ysqld'

出力。

10801 ?        Ssl    0:27 /usr/sbin/mysqld --defaults-file=/etc/mysql/my.cnf --basedir=/usr --datadir=/var/lib/mysql --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock

または。

which mysqld
/usr/sbin/mysqld

その後。

/usr/sbin/mysqld --verbose --help | grep -A 1 "Default options"

/etc/mysql/my.cnf ~/.my.cnf /usr/etc/my.cnf
解説 (0)

'/etc/mysql/my.cnf'のヘッダーから:

MariaDB programs look for option files in a set of
locations which depend on the deployment platform.
[...] For information about these locations, do:
'my_print_defaults --help' and see what is printed under
"Default options are read from the following files in the given order:"
More information at: http://dev.mysql.com/doc/mysql/en/option-files.html
解説 (0)

ドッカーコンテナー(centosベースの画像)にあります。

/etc/mysql/my.cnf。

解説 (0)