Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Cannot install mysql-client 5.6 on Ubuntu 12.04 #111

Closed
linc01n opened this issue Jul 9, 2015 · 6 comments
Closed

Cannot install mysql-client 5.6 on Ubuntu 12.04 #111

linc01n opened this issue Jul 9, 2015 · 6 comments
Labels

Comments

@linc01n
Copy link
Collaborator

linc01n commented Jul 9, 2015

For ubuntu 12.04 LTS, the kitchen test failed because it cannot install mysql client 5.6.

http://packages.ubuntu.com/search?keywords=mysql-client

/cc @patcon

@linc01n linc01n added the bug label Jul 9, 2015
@patcon
Copy link
Collaborator

patcon commented Jul 9, 2015

Hm. 5.5 has more support and might be more widely available, if we want the simplest solution (ie not changing mysql version between platforms)

@linc01n
Copy link
Collaborator Author

linc01n commented Jul 9, 2015

Do we need to specify the version here? https://github.com/bflad/chef-stash/blob/master/recipes/database.rb#L11

I don't think we should handle the mysql version ourself. Let the mysql cookbook handles it.

@patcon
Copy link
Collaborator

patcon commented Jul 9, 2015

The mysql2_chef_gem isn't aware of the mysql cookbook's preferences, so it needs to be piped in there so that the mysql2_chef_gem resource installs the correct mysql-client package that gem is linked against (I believe).

We could totally ignore the mysql_client and mysql_service version, but since mysql service version is now a resource attr, we need to allow the user the ability to set it somewhere in our cookbook, or else they are stuck with the defaults without hacking up the cookbook

How about we set default['stash]['database']['version'] = nil and use this:

  mysql2_chef_gem 'default' do
    client_version settings['database']['version'] if settings['database']['version']
    action :install
  end

  mysql_service 'default' do
    version settings['database']['version'] if settings['database']['version']
    bind_address settings['database']['host']
    # See: https://github.com/chef-cookbooks/mysql/pull/361
    port settings['database']['port'].to_s
    data_dir node['mysql']['data_dir'] if node['mysql']['data_dir']
    initial_root_password node['mysql']['server_root_password']
    action [:create, :start]
  end

patcon added a commit to patcon/chef-stash that referenced this issue Jul 9, 2015
@patcon
Copy link
Collaborator

patcon commented Jul 9, 2015

Haven't tested the above commit that reflects that comment.

Not that the platforms highlighted in this link (should we choose to add them later), will def be broken because 5.0 and 5.1 are not supported:
https://github.com/chef-cookbooks/mysql/blob/v6.0.26/libraries/helpers.rb#L414-L417

@patcon
Copy link
Collaborator

patcon commented Jul 9, 2015

But having just submitted that commit above, I'm actually inclined to use the first approach of just hardcoding 5.5, as that's what stash supports (along with 5.6.16+). If and when that approach breaks, we could then do some settings hash magic (like we do for database port) to select the right database version.

@patcon
Copy link
Collaborator

patcon commented Jul 9, 2015

👍 :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants