Mysql Percona 5.6 Configuration File
题
I've just installed a Percona instance of Mysql on an Amazon server and can not find the my.cnf
file anywhere. I found auto.cnf
in /var/lib/mysql
but there is nothing in that file like what I have seen for my standard mysql installs.
I'm using:
mysql Ver 14.14 Distrib 5.6.41-84.1, for Linux (x86_64) using 6.2
Previously I've used 5.6.14
and 5.6.35
I guess this version changed a bit?
I tried mysqld --help --verbose | grep my.cnf | tr " " "\n"
, find . -iname "my.cnf"
, find / -iname "my.cnf"
, locate my.cnf
, and whereis my.cnf
. The whereis
gave back a changed the shell, but had the same end result as all other commands which was no my.cnf
found.
The whereis
appended my:
before my shell prompt e.g. [root@ip-ip_address /]#
.
Mysql is running but from all SO threads I read there is no global variable I can select to find the conf file. Does anyone know how I can find where my configuration file lives?
解决方案
No there is no global variable for the config file locations. mysqld --help --verbose
is best to show which ones are used.
Take a look at the linux processlist to see how mysqld
is executed by init/service/systemd, that might specify a file.
Otherwise you might be running on a default config with no configuration file.
其他提示
Another place to look:
ls -ld /etc/*/my.cnf
It might be here:
/etc/mysql/percona-server.cnf
which is a softlink:
/etc/mysql/my.cnf -> /etc/alternatives/my.cnf -> /etc/mysql/percona-server.cnf