简体   繁体   中英

mysql configuration file on centos 7

I have mysql installed on centos 7 on office, I expected it would have configuiration file located at /etc/mysql/my.cnf but I spotted directly under /etc .

is it possible to find out using the mysql cli the configuration file in use ?

Please refer here for details. The article discusses the default configuration file scan order.

But you could also specify the --defaults-file when starting mysql, please use ps -ef |grep mysql or similar command to check. On my machine, the output like this(suse12):

ps -ef |grep mysql
mysql   968      1  0 Apr27 ?  00:46:36 ./mysqld --defaults-file=/export/home/mysql/mysql-8.0.11/my.cnf --user=mysql
root  71136  65599  0 11:45 pts/0  00:00:00 grep --color=auto mysql

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM