Mysql
 sql >> Base de Dados >  >> RDS >> Mysql

Para instalações homebrew mysql, onde está my.cnf?


Não há my.cnf por padrão. Como tal, o MySQL inicia com todas as configurações padrão. Se você quiser criar seu próprio my.cnf para substituir qualquer padrão, coloque-o em /etc/my.cnf.

Além disso, você pode executar mysql --help e procure nele os locais de conf listados.
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 
The following groups are read: mysql client
The following options may be given as the first argument:
--print-defaults        Print the program argument list and exit.
--no-defaults           Don't read default options from any option file.
--defaults-file=#       Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read.

Como você pode ver, também existem algumas opções para ignorar os arquivos conf ou especificar outros arquivos para serem lidos quando você invoca o mysql na linha de comando.