安装mysql后,系统中会有多个f文件。
使用 locate f 命令可以列出所有的f文件
➜ locate f
/etc/f
/usr/local/mysql/mysql-test/include/f
/usr/local/mysql/mysql-test/suite/federated/f
/usr/local/mysql/mysql-test/suite/ndb/f
/usr/local/mysql/mysql-test/suite/ndb_big/f
/usr/local/mysql/mysql-test/suite/ndb_binlog/f
/usr/local/mysql/mysql-test/suite/ndb_ddl/f
/usr/local/mysql/mysql-test/suite/ndb_memcache/f
/usr/local/mysql/mysql-test/suite/ndb_rpl/f
/usr/local/mysql/mysql-test/suite/ndb_team/f
/usr/local/mysql/mysql-test/suite/ndbcluster/f
/usr/local/mysql/mysql-test/suite/rpl/f
/usr/local/mysql/mysql-test/suite/rpl/extension/bhs/f
/usr/local/mysql/mysql-test/suite/rpl_ndb/f
1. 查看是否指定目录下的f
➜ ps aux | grep mysql | grep 'f'
命令输出结果中的--defaults-file,就是mysql启动加载的配置文件。如果没有输入结果,则表示没有设置使用指定目录的f。
2. 查看mysql默认读取的f
➜ mysql --help|grep 'f'
order of preference, f, $MYSQL_TCP_PORT,
/etc/mysql/f /etc/f ~/.f
命令mysql --help|grep 'f' 查看mysql默认读取的f,按照从前到后的优先级排序,前面的不存在,则读取后面的。通常配置在/etc/f。