简体   繁体   中英

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.

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.

I have not located the actual recipe that is selecting the packages for 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:

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 = node[:mysql][:name] || "mysql"

Looking at the attributes file (attributes/server.rb), the default values are set according to the Host's 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:

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

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