简体   繁体   English

带有AWS Opsworks Mysql层的Mysql 5.6?

[英]Mysql 5.6 with AWS Opsworks Mysql Layer?

I am looking for someone that might know how to override the default install of MySql 5.5 on the Opsworks MySql layer. 我正在寻找一个可能知道如何在Opsworks MySql层上覆盖MySql 5.5的默认安装的人。

I have tried enabling the ius repo and then a custom recipe to install the mysql56u-server, mysql56u-common packages, however all attempts thus far have failed due to the fact that mysql is being installed way earlier in the setup process. 我尝试启用ius repo,然后启用自定义配方来安装mysql56u-server和mysql56u-common软件包,但是由于在安装过程中较早地安装了mysql,因此到目前为止,所有尝试都失败了。

I have not located the actual recipe that is selecting the packages for mysql55. 我尚未找到选择mysql55软件包的实际配方。

Anyone have any insight on this? 有人对此有见识吗?

Any help much appreciated! 任何帮助,不胜感激!

Looking at the mysql Cookbook provided by AWS , the recipe that installs the client (recipes/client_install.rb) includes the following: 查看AWS提供mysql Cookbook ,安装客户端的食谱(recipes / client_install.rb)包括以下内容:

case node[:platform]
  when "redhat", "centos", "fedora", "amazon"
    package mysql_name
  else "ubuntu"
    package "mysql-client"
end

The mysql_name variable is set earlier in the recipe: mysql_name变量在配方的前面设置:

mysql_name = node[:mysql][:name] || "mysql"

Looking at the attributes file (attributes/server.rb), the default values are set according to the Host's OS: 查看属性文件(attributes / server.rb),根据主机的OS设置默认值:

if rhel7?
  default[:mysql][:name] = "mysql55-mysql"
else
  default[:mysql][:name] = "mysql"
end

You can overwrite the name value to suit your needs: 您可以覆盖名称值以适合您的需要:

default[:mysql][:name] = "mysql56u"

This can be achieved by provisioning your own customize attributes file in your Custom Cookbooks, or simply utilize the following Custom JSON in your Stack settings: 这可以通过在“自定义菜谱”中配置自己的自定义属性文件来实现,或者在堆栈设置中简单地使用以下自定义JSON:

{
  "mysql": {
    "name": "mysql56u"
  }
}

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

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