简体   繁体   English

如何为不同的mysql版本分隔/etc/my.cnf

[英]How to separate /etc/my.cnf for different mysql versions

I want to be able to have different mysql/percona servers installed on same server.我希望能够在同一台服务器上安装不同的 mysql/percona 服务器。

However only one of them will be active until I decide to deactivate it and activate another.但是,只有其中一个会处于活动状态,直到我决定停用它并激活另一个。

Is there easy way to put /etc/my.cnf inside mysql data directory instead of /etc ?有没有简单的方法可以将/etc/my.cnf放在 mysql 数据目录而不是/etc
PHP using similar approach - ini file is inside php directory and /etc/php.ini is a symlink. PHP 使用类似的方法 - ini 文件在 php 目录中,/etc/php.ini 是一个符号链接。

I am thinking about global /etc/my.cnf with single like !!includedir /xxxx/yyyy/$version .我正在考虑像!!includedir /xxxx/yyyy/$version这样的单一全局 /etc/my.cnf 。

Is this possible?这可能吗?

you can installed different version on same node with different data directive.您可以使用不同的数据指令在同一节点上安装不同的版本。 To run same,you need to run mysql server with path of config file like below:要运行相同的,您需要使用如下配置文件的路径运行 mysql 服务器:

FULL_PATH/mysqld_safe --defaults-file=FULL_PATH/my.cnf & FULL_PATH/mysqld_safe --defaults-file=FULL_PATH/my.cnf &

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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