explice无法依赖mysql,How can I add an extra configuration file for mysql (my.cnf)

I want to add and extra configuration file for MySQL on UNIX, let's call it my2.cnf. So when MySQL starts, it would read the options of that file too.

Here it says that I can put a file on the following places:

/etc/my.cnf

SYSCONFDIR/my.cnf

$MYSQL_HOME/my.cnf

defaults-extra-file The file specified with --defaults-extra-file=path, if any

~/.my.cnf User-specific options

I would like something like this "default-extra-file", but avoiding to enter this command on the mysql prompt.

Is there an option in the cnf file like:

extra-conf-file=/path/to/my/file/my2.cnf

(Unfortunately that does not work)

Is that even possible? Can I use the default my.cnf file to add another configuration file that will be read when I start themysql service?

(Using $MYSQL_HOME/my.cnf is good enough for me, but I would like to know if I can explicetely tell so it can be read or ignored according to the main my.cnf global file).

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值