sql >> Base de Datos >  >> RDS >> Mysql

Para instalaciones homebrew mysql, ¿dónde está my.cnf?

No hay my.cnf por defecto. Como tal, MySQL comienza con todas las configuraciones predeterminadas. Si desea crear su propio my.cnf para anular los valores predeterminados, colóquelo en /etc/my.cnf.

Además, puede ejecutar mysql --help y busque en él las ubicaciones de conf enumeradas.

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 puede ver, también hay algunas opciones para omitir los archivos conf o especificar otros archivos para leer cuando invoca mysql en la línea de comando.