F
F
FulgerX20072015-07-28 15:21:45
linux
FulgerX2007, 2015-07-28 15:21:45

What config file does MySQL use?

Guys how to find out which configuration file MySQL uses?
Where it is located on our server there are several of them.
Server on FreeBSD 9.2
MySQL Ver 14.14 Distrib 5.5.43, for FreeBSD9.2 (i386) using 5.2

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey, 2015-07-28
@FulgerX2007

Initially nowhere.
All settings in mysql database.
UPD.
In other directory: /usr/local/share/mysql
is a bunch of configuration files. you throw whatever you like in /usr/local/etc and edit later.
for example like this:
Don't forget to restart skul

E
Extor, 2015-07-28
@Extor

As of MySQL 5.6.8, on Unix platforms, mysql_install_db creates a default option file named my.cnf in the base installation directory.

Read here in the official documentation where the configuration files can be located and in what order they are used.
Short answer:
/etc/my.cnf
/etc/mysql/my.cnf
SYSCONFDIR/my.cnf
$MYSQL_HOME/my.cnf

N
nikolayvaganov, 2015-07-30
@nikolayvaganov

mysql -I | grep my.cnf

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question